note 27368 added to features.file-upload
| From: | dulink at scriptmatrix dot com | Date: | Tue, 03 Dec 2002 17:14:48 +0000 |
| Subject: | note 27368 added to features.file-upload | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-40302@lists.php.net to get a copy of this message | ||
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.
Kevin
http://scriptmatirix.com
--
http://www.php.net/manual/en/features.file-upload.php
http://master.php.net/manage/user-notes.php?action=edit+27368
http://master.php.net/manage/user-notes.php?action=delete+27368
http://master.php.net/manage/user-notes.php?action=reject+27368