Re: File Upload Errors
| From: | Matt McClanahan | Date: | Tue, 25 Jul 2000 22:07:21 +0000 |
| Subject: | Re: File Upload Errors | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-8151@lists.php.net to get a copy of this message | ||
On Wed, 26 Jul 2000, Ray Street wrote:
> I need help with a couple of upload questions.
>
> Firstly, I have a form which is used to get the local file names (with field
> type = "file") and the form goes to another php script that does the actual
> upload. I test the input fields to make sure that they are not empty with
> "if ($fileA == "")" but this check is never done. I have other fields on
> the
> form which I can validate OK.
>
> Secondly, when the upload takes place, I get error "Warning: Unable to open
> 'none' for reading: No such file or directory in upload.php3 on line 147".
> How do I suppress this message? - I can tell whether the upload was
> successful or not.
These two issues are sorta connected. When you have an <input type=file>,
when the form is submitted, the variable is set to 'none'. It's never
unset or empty, so that's why your first check is never triggered.
See http://zend.php.net/manual/features.file-upload.php
for more
information.
Matt