Hi. There seems to be a minor error in the page
http://www.php.net/manual/en/features.file-upload.php. In Example 38-2
"Validating file uploads", there is a line:
$uploadfile = $uploaddir . basename($_FILES['userfile']['name']);
It looks like basename() is not required there. Because i found that when i
upload a file using IE6 (IE6 includes the whole path to the uploaded file,
see
http://jakarta.apache.org/commons/fileupload/faq.html#whole-path-from-IE),
the value of $_FILES['userfile']['name'] is a file name but not a path. It
looks like php has taken the file name from the path automatically. (I am
using php 5.2.0 and win2k.) Can someone check if i am correct? Thanks.
_________________________________________________________________
Learn English via Shopping Game, FREE!
http://www.linguaphonenet.com/BannerTrack.asp?EMSCode=MSN06-03ETFJ-0211E
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php