File uploading fails
| From: | Tim Decker | Date: | Wed, 01 May 2002 15:13:35 +0000 |
| Subject: | File uploading fails | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-95529@lists.php.net to get a copy of this message | ||
I have searched high and low and done everything
recommended generically and yet am still having
problems uploading files. My script is as follows:
<BODY>
<?php
error_reporting(E_ALL);
echo phpinfo();
echo $file_name;
echo $HTTP_POST_FILES['file']['name'];
if (isset($file)){
echo "Successfully uploaded ", $file_name, "<BR>\n";
}
?>
<FORM ACTION="addimage.php" METHOD=POST
enctype="multipart/form-data">
<INPUT TYPE=FILE NAME=file><BR>
<INPUT TYPE=SUBMIT>
</FORM>
</BODY>
Output is as follows:
Warning: Undefined variable: file_name in addimage.php
on line 5
Warning: Undefined index: file in addimage.php on line
6
I get this message with all the variations of file
upload testing.
FYI I'm trying to upload a 160K jpg file for testing.
Using Apache and Linux server. WIN IE Client.
Help would be greatly appreciated.
TIA,
Tim
unka_timmyATyahoo.com
__________________________________________________
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness
http://health.yahoo.com