note 21716 deleted from function.move-uploaded-file by spic

From: Date: Tue, 17 Sep 2002 10:55:08 +0000
Subject: note 21716 deleted from function.move-uploaded-file by spic
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-36817@lists.php.net to get a copy of this message
For those who doesn't have move_uploaded_file (for version reasons) and are using copy (with the error) there is one more problem (independetly of the basedir restriction): If you copy the file, you will need double the space required to store the file for just the script's execution time, this may be a problem with very large files. I use the shell command mv with the backtick operator: $status = mv $attach $finalfilename; this workaround doesn't have the basedir restriction and uses only 1x of the file size at a time. BUT BE SURE TO escapeshellcmd THE finalfilename TO AVOID SHELL COMMAND INJECTION!!!

« previous php.notes (#36817) next »