Nope still no good.
Here is my updated code.
<html>
<head><title>Process all files</title></head>
<body>
<?php
$exit_test = "$exit";
$full_name = "$exit_test";
$dir_new = basename($full_name);
print "<h1>$dir_new</h1><hr>";
//Open Dir
$dir = opendir($exit) or die($php_errormsg);
while (false !== ($files =readdir($dir))) {
if ('.' == ($files)) {
continue;
}
if ('..' == ($files)) {
continue;
}
if (is_file($files)) {
continue;
}
$file[$x++] = $files;
}
closedir($dir);
foreach($file as $filenum => $filename)
{
print "$filenum $filename <p>\n";
}
//Create Array 15
$files = array();
//Create Table
function pc_grid_horizontal($array, $size, $dir_final) {
$table_width = 100;
$width = intval($table_width / $size);
$tr = '<tr align="center">';
$td = "<td width=\"$width%%\"><a href=\"pictures/Olympus%%20Camedia/$dir_final/%s\" target=\"window\"><img=\"pictures/Olympus%%20Camedia/$dir_final/%s\"><br>%s</a></td>";
$grid = "<table width=\"$table_width%\" style=\"table_style\">$tr";
$i = 0;
foreach ($array as $e) {
$grid .= sprintf($td, urlencode($e), urlencode($e), urlencode($e));
$i++;
if (!($i % $size)) {
$grid .= "</tr>$tr";
}
}
while ($i % $size) {
$grid .= sprintf($td, ' ', ' ', ' ');
$i++;
}
$end_tr_len = strlen($tr) * -1;
if (substr($grid, $end_tr_len) != $tr) {
$grid .= '</tr>';
} else {
$grid = substr($grid, 0, $end_tr_len);
}
$grid .= '</table>';
return $grid;
}
$grid = pc_grid_horizontal($file, 5, $dir_new);
print $grid;
?>
</body>
</html>
Two things I have noticed. One, if you take a look at the main page, under the directories I have it so you can see the arry. The first picture isn't numbered. I don't know if that even matters. I am also beginning to think this doesn't have anything to do with the php. Take a look at this page . This is the source code that my brower sees, copied, and made into a webpage. The picture still isn't there. And finally if you go to this page again, the picture isn't visable, yet the link works. Now I'm really confused.