require("connect.php"); $paperTMP= $_FILES['paper']['tmp_name']; if(is_uploaded_file($paperTMP)){ if($_FILES['paper']['type']== "application/msword"){ //creating folder while (1){ $folder= rand(1000,1000000); $result= mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM `jobs` WHERE `folder` = $folder")); if ($result[0] == 0) { break; } } mkdir($folder); chmod($folder, octdec('777')); $paper= $_FILES['paper']['name']; move_uploaded_file($paperTMP,"C:/Users/Danielle/Documents/My Webs/optimaledit/papers/".$folder."/".$paper);
- Use the [php] tags it makes it easier to read the code.
- Did the php debugger say what line the error was occurring (it normally does)
Try adding the file_exists( http://uk3.php.net/manual/en/function.file-exists.php ) to check if the file actually does exist. It could be the space on:
thanks for your feedback, when i typed in the code you gave me i got:
Folder (C:/Users/Danielle/Documents/My Webs/optimaledit/papers/332120/) not foundINSERT INTO `jobs` VALUES(28,NOW(),4,,3,1,30,"",0,"dagf","agfvg",0,0, "art.doc",332120,0)
yeah it does, right now im doing it locally, so that is where it is and it does exist. when i do it online i send it to the root folder then the papers folder. that says it doesnt exist either.
« Reply to failed to open stream: No such file or directory