Jump to content
Larry Ullman's Book Forums

Recommended Posts

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 28

Warning: 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

 Share

×
×
  • Create New...