note 27368 deleted from features.file-upload by vincent
| From: | vincent@php.net | Date: | Thu, 11 Sep 2003 12:16:24 +0000 |
| Subject: | note 27368 deleted from features.file-upload by vincent | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-56102@lists.php.net to get a copy of this message | ||
Note Submitter: dulink@scriptmatrix.com
----
After spending several useless hours trying to figure out why I couldn't upload files on an NT
server, I stumbled opon the answer..
For it to work on a windows box, you must use the full path.
Example:
copy($_FILES['userfile']['tmp_name'], "c:\\path\\to\\upload_dir\\" .
$_FILES['userfile']['name']);
not:
copy($_FILES['userfile']['tmp_name'], "/path/to/upload_dir/" .
$_FILES['userfile']['name']);
Also notice the double \\s. As far as I can tell, you must do it this way or it will not work on a
windows based server.
I hope this helps save some time for ppl working with winblows.