Jump to content

FIle Path


Nodral

Recommended Posts

Tried this and got the following errors

 

$filename="../../../tmp/user_import.csv";

 

Warning: move_uploaded_file(../../../tmp/user_import.csv) [function.move-uploaded-file]: failed to open stream: No such file or directory in D:\Documents\AI24\Web\skooch\pfp\uploadFile.php on line 11

 

Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move 'C:\WINDOWS\Temp\php427D.tmp' to '../../../tmp/user_import.csv' in D:\Documents\AI24\Web\skooch\pfp\uploadFile.php on line 11

 

 

Link to comment
https://forums.phpfreaks.com/topic/242340-file-path/#findComment-1244642
Share on other sites

This works fine if I save it in the same directory, or move up a level or 2 using ../ etc.

However, as soon as I add the tmp directory it falls over. 

This directory was manually created about 30 seconds before running the script.

It is to mirror the structure I will have when I move to my live server.

even the absolute path of $filename='localhost/tmp/user_import.csv'; fails

 

 

Link to comment
https://forums.phpfreaks.com/topic/242340-file-path/#findComment-1244647
Share on other sites

Warning: move_uploaded_file(localhost/tmp/user_import.csv) [function.move-uploaded-file]: failed to open stream: No such file or directory in D:\Documents\AI24\Web\skooch\pfp\uploadFile.php on line 11

 

Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move 'C:\WINDOWS\Temp\php4283.tmp' to 'localhost/tmp/user_import.csv' in D:\Documents\AI24\Web\skooch\pfp\uploadFile.php on line 11

 

 

Link to comment
https://forums.phpfreaks.com/topic/242340-file-path/#findComment-1244652
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.