note 77006 added to function.getimagesize

From: Date: Thu, 09 Aug 2007 21:50:44 +0000
Subject: note 77006 added to function.getimagesize
Groups: php.notes 
Request: Send a blank email to php-notes+get-129386@lists.php.net to get a copy of this message
It's always good to check out an image's dimensions while attempting to upload to your server or database...especially if it's going to be displayed on a page that doesn't accomodate images beyond a particular size. <?php $tmpName = $_FILES['userfile']['tmp_name']; list($width, $height, $type, $attr) = getimagesize($tmpName); if($width>275 || $height>275) { die("exceeded image dimension limits."); } ?> ---- Server IP: 69.147.83.197 Probable Submitter: 67.113.61.178 ---- Manual Page -- http://www.php.net/manual/en/function.getimagesize.php Edit -- https://master.php.net/note/edit/77006 Del: integrated -- https://master.php.net/note/delete/77006/integrated Del: useless -- https://master.php.net/note/delete/77006/useless Del: bad code -- https://master.php.net/note/delete/77006/bad+code Del: spam -- https://master.php.net/note/delete/77006/spam Del: non-english -- https://master.php.net/note/delete/77006/non-english Del: in docs -- https://master.php.net/note/delete/77006/in+docs Del: other reasons-- https://master.php.net/note/delete/77006 Reject -- https://master.php.net/note/reject/77006 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#129386) next »