note 27368 modified in features.file-upload by philip

From: Date: Wed, 19 Feb 2003 16:56:24 +0000
Subject: note 27368 modified in features.file-upload by philip
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-44212@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. --was-- 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

« previous php.notes (#44212) next »