Re: cvs: php4 /pear/HTML Form.php
| From: | Bertrand Mansion | Date: | Wed, 30 Jan 2002 16:39:50 +0000 |
| Subject: | Re: cvs: php4 /pear/HTML Form.php | ||
| References: | 1 | Groups: | php.pear.cvs |
| Request: | Send a blank email to pear-cvs+get-2244@lists.php.net to get a copy of this message | ||
<cox@idecnet.com> wrote :
> El mié, 30-01-2002 a las 10:26, Stig Bakken escribió:
>> ssb Wed Jan 30 04:26:25 2002 EDT
>>
>> Modified files:
>> /php4/pear/HTML Form.php
>> Log:
>> * XHTML fixes by Hans Westerbeek
>>
>>
>> ----
>>
>
>> Index: php4/pear/HTML/Form.php
>> diff -u php4/pear/HTML/Form.php:1.21 php4/pear/HTML/Form.php:1.22
>>
>> @@ -445,30 +445,29 @@
>> function displayFile($name, $maxsize = HTML_FORM_MAX_FILE_SIZE,
>> $size = HTML_FORM_TEXT_SIZE, $accept = '')
>> {
>> - print "<INPUT TYPE=\"file\" NAME=\"$name\"
>> MAXSIZE=\"$maxsize\"
>> SIZE=\"$size\"";
>> + print "<input type=\"file\" name=\"$name\"
>> maxsize=\"$maxsize\"
>> size=\"$size\"";
>> if ($accept) {
>> - print " ACCEPT=\"$accept\"";
>> + print " accept=\"$accept\"";
>> }
>> - print ">";
>> + print "/>";
>>
>> }
>>
>
> I'm curious about the "maxsize" attrib for setting the max size in a
> "input file". AFAIK this attrib is not specified in the HTML 4.0 W3
> Specs and isn't supported by the PHP upload system.
>
> So my question is: for what is that attrib there? :-)
>
> I guess that the only thing to limit the size (which will limit the size
> for all files) is with a hidden name MAX_FILE_SIZE.
I am puzzled with file uploads too, for HTML_QuickForm. Setting the
max_file_size doesn't change anything and it seems that there are
incompatibilities with Opera browser, at least with version 6.
Does PHP return an error or a message when the uploaded file is larger than
max_file_size in the hidden field or larger than the php.ini upload
parameter ?
When testing, it seems that the script just ends without notice if uploaded
file is too large. This way, I can't unfortunately indicate to the user that
his file is too large.
Hidden fields are low in term of security as they can be modified by user.
Could someone point me to resources about file uploads handling in PHP (as
it also seems there are changes in PHP 4.1). I have RTFM but it didn't help..
Bertrand Mansion
Mamasam