On Thu, 15 Feb 2001, Scott wrote:
> I am uploading files and want to limit the size of the file. I can do this
> as long as the file that I am uploading doesn't exceed the Server limit. We
> don't own the server so I can't change any configuration on the server.
>
> Is there a way to Catch the warning and display my own message in the
> browser.
>
> The Warning that I am getting is
>
> Warning: Max file size of 2097152 bytes exceeded - file [upfile] not saved
> in [no active file] on line 0
You could control filesize within the HTML form.
<input type="hidden" name="MAX_FILE_SIZE" value="(insert size)" />
This means that PHP will automatically reject files over the specified
size. As far as I know, I'm not sure you will be able to catch the
exceeded file error before it is passed back to the client, so customising
the error might be out of the question. Also, I doubt you would be able to
perform any kind of action that would determine the entire size of the
uploading file prior to the upload being completed - if there was a way to
catch this, then you would be able to redirect to an error page at the
beginning of the upload, thus meaning that there would be no time wasted
on the user's behalf. :)
Cheers,
Nicky W..
-[ [EMAIL PROTECTED] ]-
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]