note 100728 added to features.file-upload

From: Date: Wed, 03 Nov 2010 08:35:38 +0000
Subject: note 100728 added to features.file-upload
Groups: php.notes 
Request: Send a blank email to php-notes+get-173704@lists.php.net to get a copy of this message
As said before on this page, sometimes you may get empty $_FILES and empty $_POST. If this happens, this is probably because the posted file size exceed the post_max_size php ini directive value. You could use something like this to handle it in your form, here it is : // The form isn't misbehavin then… if (empty($_FILES) && empty($_POST) && isset($_SERVER['REQUEST_METHOD']) && strtolower($_SERVER['REQUEST_METHOD']) == 'post') { $poidsMax = ini_get('post_max_size'); $oElement->addError("fileoverload", "Your feet is too big, maximum allowed size here is $poidsMax."); } ---- Server IP: 69.147.83.197 Probable Submitter: 77.202.90.187 ---- Manual Page -- http://www.php.net/manual/en/features.file-upload.php Edit -- https://master.php.net/note/edit/100728 Del: integrated -- https://master.php.net/note/delete/100728/integrated Del: useless -- https://master.php.net/note/delete/100728/useless Del: bad code -- https://master.php.net/note/delete/100728/bad+code Del: spam -- https://master.php.net/note/delete/100728/spam Del: non-english -- https://master.php.net/note/delete/100728/non-english Del: in docs -- https://master.php.net/note/delete/100728/in+docs Del: other reasons-- https://master.php.net/note/delete/100728 Reject -- https://master.php.net/note/reject/100728 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#173704) next »