hmm i don't know where the php control setting is to up it to 5 yet. So right now i have the 4 up on my page but its not writing the images still for some reason. When i look at the source in a web browser it just has a comments tag (<!-- ... -->).
http://www.bluewalrus.net/testing.php
I only changed the directory in the php code so that it would link correctly.
I'll put in the whole pages html in case there's something I've put in wrong in the validation side as well.
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Untitled Document</title>
</head>
<body>
<?php
define('IMG_DIR', 'images/');
function is_image($fn) {
return in_array(pathinfo($fn, PATHINFO_EXTENSION), array('jpg', 'jpeg', 'png', 'gif'));
}
$imgs = array();
$dir = opendir(IMG_DIR);
while ($ff = readdir($dir))
if (is_image($f))
$imgs[] = IMG_DIR . '/' . $f;
closedir($dir);
?>
<!-- ... -->
<?php foreach ($imgs as $img) { ?>
<a href="$img">
<img src="$img" alt="pathinfo($img, PATHINFO_FILENAME);">
</a>
<?php } ?>
</body>
</html>
Just went into my host and i think i had php only set to 3 so i think i just added 4 and 5 if this is what that looks like?
Code:
<IfModule mod_php4.c>
AddType application/x-httpd-php .php3
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
AddType application/x-httpd-php .php5
AddType application/x-httpd-php .php4
Bookmarks