Jump to content

move_uploaded_file error


Recommended Posts

Hi

I'm using a script and when i want to upload a picture is says:

 

Warning: move_uploaded_file(/home/tomani/public_html/film/small/usa.png) [function.move-uploaded-file]: failed to open stream: No such file or directory in C:\xampp\htdocs\300tomani\admin\move.php on line 207

 

Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move 'C:\xampp\tmp\phpDB46.tmp' to '/home/tomani/public_html/film/small/usa.png' in C:\xampp\htdocs\300tomani\admin\move.php on line 207

 

the code is:

	 move_uploaded_file($_FILES['F1']['tmp_name'], "/home/tomani/public_html/film/small/".$_FILES['F1']['name']);

The "/home/tomani/public_html/film/small/" path does not exist because it is predefined.

so i want to change it to work either on localhost (myPC) and on server (hosting), how?

Thank you

 

Link to comment
https://forums.phpfreaks.com/topic/203729-move_uploaded_file-error/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.