Reply to Re: [PHP] file uploads and sizes

Your name:

Reply:


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/

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация