i have this code:
and keep receiving the errors:Code:<?php $images = "/images/thumbnail"; $big = "/images/main"; $cols = 2; if ($handle = opendir($images)) { while (false !== ($file = readdir($handle))) { if ($file != "." && $file != ".." && $file != rtrim($big,"/")) { $files[] = $file; } } closedir($handle); } $colCtr = 0; echo '<table width="100%" cellspacing="3"><tr>'; foreach($files as $file) { if($colCtr %$cols == 0) echo '</tr><tr><td colspan="2"><hr /></td></tr><tr>'; echo '<td align="center"><a href="' . $images . $big . $file . '"><img src="' . $images . $file . '" /></a></td>'; $colCtr++; } echo '</table>' . "\r\n"; ?>
Warning: opendir(/images/thumbnail) [function.opendir]: failed to open dir: No such file or directory in /home/tim783/public_html/ant/thirdproj/gallery.php on line 80
Warning: Invalid argument supplied for foreach() in /home/tim783/public_html/ant/thirdproj/gallery.php on line 93
i have changed $images = "/images/thumbnail"; to the full url and anything i can think of but no luck...any helpers?




Bookmarks