note 76116 added to function.getimagesize

From: Date: Sun, 01 Jul 2007 08:16:12 +0000
Subject: note 76116 added to function.getimagesize
Groups: php.notes 
Request: Send a blank email to php-notes+get-128126@lists.php.net to get a copy of this message
I'm working on files on a server where I can't change the php configuration. I wanted to use this with files that potentially weren't images / broken URLs. When this fails it returns an E_Warning, but you can also check for failure if the width or height are 0. I wanted to use my own system for telling the user that there was an error, but I couldn't figure out how to hide the php E_Warning error... until i thought of this! <?php print("<!--"); $is = getimagesize($pic); print("-->"); ?> =D figured this might be useful for somebody else having the same problem. ---- Server IP: 208.69.120.35 Probable Submitter: 68.231.90.123 ---- Manual Page -- http://www.php.net/manual/en/function.getimagesize.php Edit -- https://master.php.net/note/edit/76116 Del: integrated -- https://master.php.net/note/delete/76116/integrated Del: useless -- https://master.php.net/note/delete/76116/useless Del: bad code -- https://master.php.net/note/delete/76116/bad+code Del: spam -- https://master.php.net/note/delete/76116/spam Del: non-english -- https://master.php.net/note/delete/76116/non-english Del: in docs -- https://master.php.net/note/delete/76116/in+docs Del: other reasons-- https://master.php.net/note/delete/76116 Reject -- https://master.php.net/note/reject/76116 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#128126) next »