MAX_FILE_SIZE only tells the browser how large the file should be. This is
why the PHP manual page also says, "The MAX_FILE_SIZE is advisory to the
browser. It is easy to circumvent this maximum. So don't count on it that
the browser obeys your wish! The PHP-settings for maximum-size, however,
cannot be fooled. "

-----Original Message-----
From: Gurhan Ozen [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 10, 2003 9:50 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] File upload problem


On Sun, 2003-02-09 at 19:43, Jason Wong wrote:
> On Monday 10 February 2003 05:56, Gurhan Ozen wrote:
>
> > You need to specifye the MAX_FILE_SIZE value as a hidden argument to the
> > form..
> > See: http://www.php.net/manual/en/features.file-upload.php
>
> You don't.
>
> If you can show otherwise please post details to the list.
>

Hi Jason,
I remember reading it on the book "PHP and MySQL Web development" book
by Luke Welling and Laura Thompson. I just checked the book again, on
page 353, when explaining file upload it reads "You must have a form
field that sets the maximum size file that can be uploaded". Then it
says "The name of this form field must be MAX_FILE_SIZE".
Also in the PHP manual which can be seen at:
http://www.php.net/manual/en/features.file-upload.php, it reads:
" The _URL_ should point to a PHP file. The MAX_FILE_SIZE hidden field
must precede the file input field and its value is the maximum filesize
accepted. The value is in bytes."
Which sounds like it has to be there to me? I just checked a working
file upload form without MAX_FILE_SIZE field, and it worked.. I guess i
misunderstood what was on the tutorials ? Or i wonder if this was a must
in the earlier versions of PHP? Anyone?
And thanks for correcting me..
Gurhan

> --
> Jason Wong -> Gremlins Associates -> www.gremlins.biz
> Open Source Software Systems Integrators
> * Web Design & Hosting * Internet & Intranet Applications Development *
> ------------------------------------------
> Search the list archives before you post
> http://marc.theaimsgroup.com/?l=php-general
> ------------------------------------------
> /*
> To keep your friends treat them kindly; to kill them, treat them often.
> */
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>





--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to