note 85918 deleted from function.move-uploaded-file by danbrown

From: Date: Wed, 24 Sep 2008 16:20:37 +0000
Subject: note 85918 deleted from function.move-uploaded-file by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-144677@lists.php.net to get a copy of this message
Note Submitter: Anonymous ---- When using this function to move new uploads, it apparently can fail if you name the destination file with a filename (this excludes any path to the file) other than the actual name of the upload. So: <?move_uploaded_file($_FILES['userfile']['tmp_name'], '../somedir/'.$_FILES['userfile']['name']);?> Will work without a hitch, while <?move_uploaded_file($_FILES['userfile']['tmp_name'], '../somedir/someoddfilename.txt');?> will return true, yet not move the file to the new filename. I am unsure wether this is solely a windows 'error', or is a generic php flaw. It doesn't appear to act this way with all file-types, and even individual files may be excepted.

« previous php.notes (#144677) next »