note 76116 deleted from function.getimagesize by mazzanet
| From: | mazzanet@php.net | Date: | Mon, 28 Jan 2008 10:59:21 +0000 |
| Subject: | note 76116 deleted from function.getimagesize by mazzanet | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-135461@lists.php.net to get a copy of this message | ||
Note Submitter: tim at dataxpress dot net
----
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.