图像未在Firefox中加载(动态图像标记生成)

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.

Please replace '\' by '/'

Here is the new code:

$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.
  }

  }
}

Have you got adBlock in your FF ? Sometime adBlock auto hide banner.

Or you can use Firebug plugin to check the image path.