Re: File Upload Issues
| From: | Tom Rogers | Date: | Sun, 21 Sep 2003 03:21:29 +0000 |
| Subject: | Re: File Upload Issues | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-163326@lists.php.net to get a copy of this message | ||
Hi,
Sunday, September 21, 2003, 1:10:29 PM, you wrote:
SK> I was hoping to get a bit of help with a strange file upload issue that
SK> I am having. Below is a simple form that I am using as an example. The
SK> output from the $_FILES array follows that. The thing that I am unable
SK> to resolve is the fact that the file upload returns the name of the
SK> file the user is uploading, but will not give me the tmp_name or the
SK> type. I am having this problem with this form and another as part of an
SK> application I am working on, however, I have another form with 2 file
SK> upload fields that works normally.
SK> HTML FORM:
SK> <form enctype="multipart/form-data" action="test.php"
SK> method="POST">
SK> <input type="hidden" name="MAX_FILE_SIZE" value="2048">
SK> Send this file: <input name="userfile" type="file"
SK> size="25">
SK> <input type="submit" value="Send File" name="submit">
SK> </form>
SK> PHP CODE & OUTPUT:
SK> code:
SK> echo "Temp Name: " . $_FILES['userfile']['tmp_name'] .
SK> "<br>";
SK> echo "File Name: " . $_FILES['userfile']['name'] .
SK> "<br>";
SK> echo "File Type: " . $_FILES['userfile']['type'] .
SK> "<br>";
SK> output:
SK> Temp Name:
SK> File Name: news.pdf
SK> File Type:
SK> Shad Kaske
what do you get in $_FILES['userfile']['error']
It might give you a clue
--
regards,
Tom