I am trying to build a little image browser in php, but the difficulty comes because the images are on another hard drive in my computer.
I have the below code which outputs the file names but I can not get it to work with outputting an <img> tag to show the actual image.
Any ideas how to get the images to show?
$startdir = 'F:\\Images\\Photography\\';
$ignoredDirectory[] = '.';
$ignoredDirectory[] = '..';
$dh = opendir($startdir);
while (($file = readdir($dh)) !== false){
if (!(array_search($file,$ignoredDirectory) > -1)){
echo substr($file, 0, strlen($file)-4);
echo "<br><img src=\"$startdir$file\"><br><br>";
}
}
closedir($dh);