Code Errror
Posted: Sat May 22, 2004 3:24 pm
I wrote this code for a guy awhile back and decided to put it into use for myself, but now I'm butting some errors taht I don't understand.
The files are there im images/JC and images/
The code is
Help plz
Code: Select all
Warning: opendir(): open_basedir restriction in effect. File(/images/JC/thumbs/) is not within the allowed path(s): (/home/runtings:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/runtings/public_html/imagehandler.php on line 7
Warning: opendir(/images/JC/thumbs/): failed to open dir: Operation not permitted in /home/runtings/public_html/imagehandler.php on line 7The code is
Code: Select all
<?php
<?
$i=1;
$dir = "/images/JC/thumbs/"; // thumbs (duh)
$bigdir = "/images/JC"; // originalsized, using same names as thumbs
echo '<table>';
if ($handle = opendir($dir)) {
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != "..") {
$i++;
// opens row and column is remainder is odd else open column
if ($i%2=='1'){ echo '<tr><td>'; }else{ echo '<td>'; }
echo "<a href="$bigdir/$file"><img src="$dir/$file" border="1"></a>";
// closes row and column is remainder is odd else close column
if ($i%2=='1'){ echo '</td></tr>'; }else{ echo '</td>'; }
}
}
echo '</table>';
closedir($handle);
}
?>
?>