Re: Copy files to webserver
| From: | Jordan S. Jones | Date: | Mon, 14 Apr 2003 15:45:20 +0000 |
| Subject: | Re: Copy files to webserver | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-143797@lists.php.net to get a copy of this message | ||
Not sure, but can files start with a " " (space) in Linux? Try trim()'ing your $_FILES['importFile'] ['name']
Jordan S. Jones
Mike Tuller wrote:
I am trying to create a script that will copy a file to the webserver, and I am getting the following error. Warning: copy(/Library/WebServer/Documents/assets/hardware/tmp/ hardwareexport.txt) [function.copy]: failed to create stream: No such file or directory in /Library/WebServer/Documents/asset/hardware/importfile.php on line 13 This is the code that I have. copy ($_FILES['importFile'] ['tmp_name'], "/Library/WebServer/Documents/assets/hardware/tmp/" .$_FILES['importFile'] ['name']) or die ("Couldn't copy the file."); Can anyone see where I am going wrong? Mike