I want to show images residing inside a directory in PHP The code which I wrote was
<?php
$dir = opendir("upload");
while (($file = readdir($dir)) !== false)
{
echo "filename: " . $file . "<br />";
echo "<a href='shoe.php?image_name=".$file."'> <img src='upload/".$file[0]."' width='150' height='150' /></a></td>";
}
closedir($dir);
?>
Here the images are not displayed. Only a frame comes for that image and the actual image is not displayed inside that. Where I have went wrong? Can any one please help...