For those who have not set TMPNAME in php.ini (Thanks, again, to Lars)

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@32084 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Ron Chmara 2000-09-06 06:40:09 +00:00
parent ce6a94a250
commit be1a028b7f

View file

@ -83,6 +83,10 @@ Send this file: <INPUT NAME="userfile" TYPE="file">
// Make sure file is coming from upload directory
$uploadpath = get_cfg_var('upload_tmp_dir') . '/' . basename($userfile);
// If you have not set your TMPDIR in pnp.ini, the following line
// can be uncommented, and used instead of the above line
// $uploadpath = dirname(tempnam('', '')) . '/' . basename($userfile);
if (file_exists($uploadpath)){
copy ("$uploadpath", "/place/to/put/uploaded/file");
} else {