note 30377 modified in features.file-upload by danbrown

From: Date: Sun, 17 May 2009 18:51:13 +0000
Subject: note 30377 modified in features.file-upload by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-155184@lists.php.net to get a copy of this message
As it has been mentioned, Windows-based servers have trouble with the path to move the uploaded file to when using move_uploaded_file()... this may also be the reason copy() works and not move_uploaded_file(), but of course move_uploaded_file() is a much better method to use. The solution in the aforementioned note said you must use "\\" in the path, but I found "/" works as well. So to get a working path, I used something to the effect of: "g:/rootdir/default/www/".$_FILES['userfile']['name'] ...which worked like a charm. I am using PHP 4.3.0 on a win2k server. Hope this helps! --was-- As it has been mentioned above, Windows-based servers have trouble with the path to move the uploaded file to when using move_uploaded_file()... this may also be the reason copy() works and not move_uploaded_file(), but of course move_uploaded_file() is a much better method to use. The solution in the aforementioned note said you must use "\\" in the path, but I found "/" works as well. So to get a working path, I used something to the effect of: "g:/rootdir/default/www/".$_FILES['userfile']['name'] ...which worked like a charm. I am using PHP 4.3.0 on a win2k server. Hope this helps! http://php.net/manual/en/features.file-upload.php

« previous php.notes (#155184) next »