I am trying to load image dynamically using DirectoryIterator. The problem is that the images are getting loaded as expected in google chrome and IE, but in firefox nothing shows up.
Below is the code that I am working on.
$dir = new DirectoryIterator(getcwd()."\emoticons");
foreach($dir as $folder)
{
if(strlen($folder) > 2) // sometimes $folder is blank so.
{
$files = new DirectoryIterator(getcwd()."\emoticons\\".$folder);
echo "<br>".$folder;
foreach($files as $file)
{
echo "<img src = 'emoticons\\".$folder."\\".$file."'></img>"; // doesnt work in FF.
}
}
}
I dont know why this could possibly be happening. If anyone has any experience around this problem then please share.
Regards, Sameeksha.