File: "; } else { $errors = array( "UPLOAD_ERR_OK Value: 0; There is no error, the file uploaded with success.", "UPLOAD_ERR_INI_SIZE Value: 1; The uploaded file exceeds the upload_max_filesize directive in php.ini.", "UPLOAD_ERR_FORM_SIZE Value: 2; The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form.", "UPLOAD_ERR_PARTIAL Value: 3; The uploaded file was only partially uploaded.", "UPLOAD_ERR_NO_FILE Value: 4; No file was uploaded.", "No such error code as 5!?", "UPLOAD_ERR_NO_TMP_DIR Value: 6; Missing a temporary folder. Introduced in PHP 4.3.10 and PHP 5.0.3.", "UPLOAD_ERR_CANT_WRITE Value: 7; Failed to write file to disk. Introduced in PHP 5.1.0.", "UPLOAD_ERR_EXTENSION Value: 8; A PHP extension stopped the file upload. PHP does not provide a way to ascertain which extension caused the file upload to stop; examining the list of loaded extensions with phpinfo() may help. Introduced in PHP 5.2.0." ); echo "
";
	if ($_FILES["f1"]["error"] === 0) {
		echo "
Upload successful
name = {$_FILES['f1']['name']}
tmp_name = {$_FILES['f1']['tmp_name']}
size = {$_FILES['f1']['size']} bytes
";
    } else {
        $error = $_FILES['f1']['error'];
        echo
"Upload failed with error $error:
{$errors[$error]}";
	}
	echo "

Try another upload
"; echo "

Details:
"; var_dump($_FILES); echo "

Free space on /tmp:
"; system("df -h /tmp"); echo "


"; echo "PHP File Upload Error Messages"; }