note 47366 deleted from function.getimagesize by mazzanet
| From: | mazzanet@php.net | Date: | Mon, 28 Jan 2008 11:07:30 +0000 |
| Subject: | note 47366 deleted from function.getimagesize by mazzanet | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-135465@lists.php.net to get a copy of this message | ||
Note Submitter: Geoff Vane
----
WARNING:
I couldn't get getimagesize() to work when using certain arrays.
The solution was simple but easily overlooked:
When using an array and/or a .txt file,
to store & extract an image filename,
which getimagesize() should examine,
an almost unnoticable and unwanted space can exist !!!
(at the end of the string..)
Use rtrim($yourfilenamestring) to get rid of the space
that will block your getimagesize() operation.
example:
$a = getimagesize(rtrim($yourfilenamestring) ) ;
$a[0] will contain the width
$a[1] will contain the height
:)