note 33198 deleted from function.getimagesize by didou

From: Date: Fri, 15 Aug 2003 16:34:13 +0000
Subject: note 33198 deleted from function.getimagesize by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-54215@lists.php.net to get a copy of this message
Note Submitter: rutger@hensel.nl ---- When I used this: $fileName='abc defg.gif'; // filename has a blank in it $webDir='http://www.myserver.tld/img'; // 1st part of URL $size = getimagesize($webDir."/".$fileName); I got this: Warning: getimagesize: Unable to open 'http://www.myserver.tld/img/abc defg.gif' for reading. in /blabla/index.php on line 683 So I changed it into this: $size = getimagesize($webDir."/".str_replace(' ','%20',$fileName)); //urlencode only the blanks Hope it helps someone... Happy PHPing!

« previous php.notes (#54215) next »