Paul_Blackpool Posted February 3, 2013 Share Posted February 3, 2013 Whe I try to upload a file (Chapter 10 file_upload.php) I get the following errors Warning: move_uploaded_file(../tmp/agriculture.jpg): failed to open stream: No such file or directory in C:\xampp\htdocs\trsb\upload_image.php on line 28Warning: move_uploaded_file(): Unable to move 'C:\xampp\tmp\phpA805.tmp' to '../tmp/agriculture.jpg' in C:\xampp\htdocs\trsb\upload_image.php on line 28 The folder I have created is called "tmp" and I followed the instructions for the local server. here is the line the error is referring to: // Move the file over if(move_uploaded_file($_FILES['upload']['tmp_name'],"../tmp/{$_FILES['upload']['name']}")) { echo '<p><em>The file has been uploaded</em></p>'; } // End of move . IF. Link to comment Share on other sites More sharing options...
Antonio Conte Posted February 3, 2013 Share Posted February 3, 2013 The script cannot find the path you specify. Play around some more, and find the correct path. Link to comment Share on other sites More sharing options...
Recommended Posts