File Upload

From: Date: Sat, 14 Dec 2002 03:03:05 +0000
Subject: File Upload
Groups: php.general 
Request: Send a blank email to php-general+get-128245@lists.php.net to get a copy of this message
Hi everybody, I'm trying to upload a file using the following scripts, but it doesn't work, it actually doesn't get through the first line of PHP script at all and displays "a problem has occured" message. I'm running the script on RH Linux/PHP4. Is there anything I'm missing here??? Many thanks in advance, Miro. --------------------------------------------------------------------- [upload_file.html] <html> <head><title>File Upload</title></head> <body> <form id="data" method="post" action="input_file.php" enctype="multipart/form-data"> <p> Choose a file: <br> <input name="testfile" type="file" size="50" maxlength="100000"><br> <input name="submit" type="submit"> </p> </form> </body> </html> [input_file.php] <?php if ($testfile) { if (is_uploaded_file($testfile)) { echo "userfile: $testfile<br>\n"; echo "userfile_name: $testfile_name<br>\n"; echo "userfile_size: $testfile_size<br>\n"; } else { echo "no file updated"; } } else { echo "a problem has occured"; } ?>

« previous php.general (#128245) next »