note 59566 rejected from function.is-uploaded-file by nlopess

From: Date: Mon, 12 Dec 2005 20:20:48 +0000
Subject: note 59566 rejected from function.is-uploaded-file by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-100028@lists.php.net to get a copy of this message
Note Submitter: greg at gbhumphrey dot com ---- Hi Im using php4 on a mac and wehen I test the file upload example html with isuploaded() function,- the file is named isuploaded.php- like this: <?php if (is_uploaded_file($_FILES['userfile']['tmp_name'])) {    echo "File ". $_FILES['userfile']['name'] ." uploaded successfully.\n";    echo "Displaying contents\n";    readfile($_FILES['userfile']['tmp_name']); } else {    echo "Possible file upload attack: ";    echo "filename '". $_FILES['userfile']['tmp_name'] . "'."; } ?> I get an "error on line 3 of isuploaded.php" message!! here's my html <form enctype="multipart/form-data" action="isuploaded.php" method="POST"> <!-- MAX_FILE_SIZE must precede the file input field --> <input type="hidden" name="MAX_FILE_SIZE" value="30000" /> <!-- Name of input element determines name in $_FILES array --> Send this file: <input name="userfile" type="file" /> <input type="submit" value="Send File" /> </form> Im following the examples on this website and it doesnt' work. I've checked my php.ini file and the file upload is set to "On". anyone have any ideas? thanks

« previous php.notes (#100028) next »