|
Posted by Greg Donald on 05/06/05 06:54
On 5/5/05, Cima <ruel.cima@facinf.uho.edu.cu> wrote:
> i have the following code that works except when the file i'm trying to
> upload excedes the upload_max _filesize and post_max_size defined in the
> php.ini file.
> what happens when the file is smaller than the max sizes mentioned
> previously, the if (isset .....) part of the code is executed yet when the
> file exceeds both max sizes, i just get a blank page.
> what id like is to be able to give the user a message saying the file wasnt
> uploaded because the file was too big.so, how do i verify the size of the
> file the user is trying to upload? ive already tried
> $_FILES['archivo']['size'], but that doesnt work if the variable isnt set,
> which aparently happens when the file isnt uploaded because of the
> post_max_size.
>
> any help will be greatly appreciated!!
You need to evaluate each of the possible return values for
$_FILES[ 'archivo' ][ 'error' ]
http://php.net/manual/en/features.file-upload.errors.php
--
Greg Donald
Zend Certified Engineer
http://destiney.com/
Navigation:
[Reply to this message]
|