hi all, i have created a script for uploading picture files and it works perfectly in firefix but in IE 6 or 7 it gives me this error : Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpFuOidl' to '' in /home/site/public_html/upload.php on line 75 error in saving file my script is : <? require("functions.php"); if($_POST["submit"]){ $upload_file; $msg = ""; if($_FILES["userfile"] == ""){ $upload_file = false; $msg .= "please select a picture file to upload .<br>"; }else{ $userfile = $_FILES["userfile"]; $userfile_name = $_FILES["userfile"]["name"]; $userfile_size = $_FILES["userfile"]["size"]; $userfile_type = $_FILES["userfile"]["type"]; } if(!($userfile_type == "image/jpg" or $userfile_type == "image/jpeg" or $userfile_type == "image/png" or $userfile_type == "image/gif")){ $msg .= "<br>extension allowed only : jpg & jpeg & gif & png"; $upload_file = false; }else{ $upload_file = true; } if($userfile_size > 1024000){ $msg .= "max file size is : 1024 KB"; $upload_file = false; }else{ $upload_file = true; } $path = "upload/".next_file_name().".jpg"; // next_file_name() is function that gets the new name from the BataDase if($upload_file == false){ echo $msg; }else{ if(move_uploaded_file($userfile["tmp_name"], $path)){// line where the error pointing echo "<br>"; echo "file uploaded successfuly"; chmod("{$path}",0777); }else{ echo "error in saving file"; } } ?> PHP: please i need help this script is again run perfectly in Firefox but in IE i don't know what happend
Unable to move means a permission problem and should not work at all. Chmod tmp to 777. If that still not fix this, drop me a PM.
no the permission is right 0777 and it works fine in firefox the problem in IE i tried it on may PCs and it is the same problem on IE gives me this error but on firefox works fine