Re: Help with upload && error message
| From: | Bob Lockie | Date: | Tue, 06 Aug 2002 00:23:14 +0000 |
| Subject: | Re: Help with upload && error message | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-111303@lists.php.net to get a copy of this message | ||
>Hi all,
>
>I'd like to hide this message I've get when I upload big file more than 2 Mo, because
>I want to warn the user using my script.
>
>Does anyone know how to do this ?
>
>In my form I include -
><FORM ACTION="index.php" METHOD="POST"
>ENCTYPE="multipart/form-data">
><INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="1000000">
>
>This is the message I don't want to have:
>
>PHP Warning: Max file size of 2097152 bytes exceeded - file [file] not saved in Unknown on line
>0 PHP Warning: Cannot send session cache limiter - headers already sent in c:\inetpub
\wwwroot\ohabolana\index.php on line 2
There is a directive in php.ini to increase the max file size.
I have no idea how to check the size of the file in PHP but you could do that
and then write out whatever you want.