PHP3 file upload

From: Date: Mon, 22 Oct 2001 19:15:11 +0000
Subject: PHP3 file upload
Groups: php.general 
Request: Send a blank email to php-general+get-71860@lists.php.net to get a copy of this message
This is from the manual -- <?php function is_uploaded_file($filename) { if (!$tmp_file = get_cfg_var('upload_tmp_dir')) { $tmp_file = dirname(tempnam('', '')); } $tmp_file .= '/' . basename($filename); } if (is_uploaded_file($userfile)) { copy($userfile, "file.test"); } else { echo "<br>Possible file upload attack: filename '$userfile_name'."; } ?> This uploads the file into the correct temp directory, it recognizes the filename, etc., but it won't copy it. I only can achieve the error message. I need to use PHP3 for this, I'm obviously missing something. Thanks, Robert

« previous php.general (#71860) next »