Hi. I'm trying to modify a script so that i can use it to produce a photo gallery by reading thumbnails from one directory and the actual images from another. This is the code i have at the moment:
<html>
<head>
</head>
<body>
<div align="center"><center>
<?php
$a = '0';
$filepath = "http://m-panayiotou.fireflyinternet.co.uk/phpgallery/thumbs";
$url_path = "http://m-panayiotou.fireflyinternet.co.uk/phpgallery/images";
$dir = dir($filepath);
echo "<table border=\"0\" cellpadding=\"5\" cellspacing=\"5\" width=\"75%\">";
while($entry=$dir->read()) {
if($entry == "." || $entry == "..") {
continue;
}
$fp = @fopen("$filepath/$entry","r");
if ($a == '0') {echo "<tr>";}
if ($a == '5') {echo "<tr>";}
if ($a == '10') {echo "<tr>";}
if ($a == '15') {echo "<tr>";}
?><td>
<a href="<? echo "../$url_path/$entry" ?>">
<img src="<? echo "../$filepath/$entry" ?>" alt="<? echo $entry ?>"></a>
</td>
<?
$a = $a + 1;
}
?>
</tr>
</table>
</center></div>
</body>
</html>
However, when i run the script i get the following errors that it can't open the directory:
Warning: dir(http://m-panayiotou.fireflyinternet.co.uk/phpgallery/thumbs): failed to open dir: not implemented in c:\domains\M-PANAYIOTOU.fireflyinternet.co.uk\wwwroot\phpgallery\gallery.php on line 10
Fatal error: Call to a member function on a non-object in c:\domains\M-PANAYIOTOU.fireflyinternet.co.uk\wwwroot\phpgallery\gallery.php on line 12
Can anyone tell me how to fix this. Thanks.