title: PHP Replace function not working with Internet explorer 8
body: <p>I have a little problem with my website, it is a free classified ads website where people upload photos to their ad, etc.</p>
  
  <p>Problem: my upload script work perfectly with all my computers, but when I check in my Error_Log it show that a lot of people can't upload their picture (it does upload in the temp folder but when I use the rename function to copy it in the ad folder it does not work and say: No such file blah blah blah. So I found someone who has the problem of uploading and realize that internet explorer was the problem.</p>
  
  <p>My version is :</p>
  
  <p>Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)</p>
  
  <p>which seem to work fine and the version he is using is:</p>
  
  <p>Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; WOW64; Trident/4.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.30729; .NET CLR 3.</p>
  
  <p>which does not work.</p>
  
  <p>Is there any reason why my function do work in Internet Explorer 9.0, Firefox, and Chrome but not in IE 8?</p>
  
  <p><strong>EDIT</strong>
  (This is the code for transfering the files from temp folder of the user to the ad folder:)</p>
  
  <pre><code>mkdir("./users/".$this-&gt;Username."/".$Id, 0755);
  mkdir("./users/".$this-&gt;Username."/".$Id.'/thumbnail', 0755);
  $Files_List = explode("@",$_POST['Files_Names']);
  for($i = 0;$i &lt; count($Files_List);++$i)
  {
      if($Files_List[$i] != "")
      {
          rename('./users/'.$this-&gt;Username.'/temp/'.$Files_List[$i], './users/'.
          $this-&gt;Username.'/'.$Id.'/'.$Files_List[$i]);
          rename('./users/'.$this-&gt;Username.'/temp/thumbnail/'.$Files_List[$i], './users/'.
          $this-&gt;Username.'/'.$Id.'/thumbnail/'.$Files_List[$i]);
      }
  }
  $dir = './users/'.$this-&gt;Username.'/temp/';
  foreach(glob($dir.'*.*') as $v)
      unlink($v);
  $dir = './users/'.$this-&gt;Username.'/temp/thumbnail/';
  foreach(glob($dir.'*.*') as $v)
      unlink($v);
  
  echo '&lt;script&gt;window.location = "./message.php?Message=Publier";&lt;/script&gt;';
  exit(0);
  
  
  Error message:
  
  
  [17-Oct-2011 12:31:17] PHP Warning: rename&gt;(./users/francois/temp/thumbnail/2590cd9217.jpg ,./users/francois/186/thumbnail/2590cd9217.jpg ) [href='function.rename'&gt;function.rename]: No such file or directory&gt;in /home/kesimard/public_html/Montreal/publier.php on line 70
  
  Line 70 = rename('./users/'.$this-&gt;Username.'/temp/thumbnail/'.$Files_List[$i], './users/'. $this-&gt;Username.'/'.$Id.'/thumbnail/'.$Files_List[$i]);
  </code></pre>