sinkhead Posted May 11, 2007 Share Posted May 11, 2007 // Now we should move the uploaded file to it's temporary directory message("Temporary directory: temp/$tempfolder/".$_FILES['uploadedfile']['name']); if(copy($_FILES['uploadedfile']['tmp_name'], "temp/$tempfolder/".$_FILES['uploadedfile']['name'])){ success("Uploaded file moved to temporary directory"); } else { cleanup("Uploaded file could not be moved to temporary directory"); } $tempfolder - A unique 5 digit folder name message(); - Sends output as a message (applies certain formatting etc) cleanup(); - There has been an error so this function displays the error applying formatting. It also deletes all the temporary files and so on. This part of the script is designed to move the uploaded file (a ZIP) to a temporary location that I can access and use the ImageMagick library on. The error displayed is Uploaded file could not be moved to temporary directory I'm not very good at PHP and I followed the tutorial here Please help me - Sam Quote Link to comment https://forums.phpfreaks.com/topic/50963-uploader-errors/ Share on other sites More sharing options...
sinkhead Posted May 11, 2007 Author Share Posted May 11, 2007 Ok, so I've gotten a bit further with sorting out my problem. When I check the $_FILES variable using print_r() I get this: Array ( [uploadedfile] => Array ( [name] => shinji.zip [type] => [tmp_name] => [error] => 2 [size] => 0 ) ) My file can't be moved because [tmp_name] isn't set. And I havn't got a clue why this is... Can someone please shed some light on this? - Sam Quote Link to comment https://forums.phpfreaks.com/topic/50963-uploader-errors/#findComment-250759 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.