Re: Re: php NEWBIE get image warning
| From: | Tom Rogers | Date: | Fri, 23 May 2003 08:00:41 +0000 |
| Subject: | Re: Re: php NEWBIE get image warning | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-148735@lists.php.net to get a copy of this message | ||
Hi,
Friday, May 23, 2003, 5:39:36 PM, you wrote:
bx> Whay can I do to fix this?
bx> Warning: getimagesize: Unable to open
bx> '/home/sites/site197/web/photos/16-5-2003---8-21-10_Kevin
bx> try 002.jpg' for reading. in
bx> /home/sites/site197/web/include/misc_fns.php on line 241
bx> _________________________________________________________________
bx> STOP MORE SPAM with the new MSN 8 and get 2 months FREE*
bx> http://join.msn.com/?page=features/junkmail
best to convert spaces to underscores in filenames to avoid problems
like this.
When uploading images I always do this:
$filename = trim($_FILES["uploadfile"]["name"]);
if(!empty($filename)){
$filename = ereg_replace("'","",$filename);
$filename = ereg_replace("%20","_",$filename);
$filename = ereg_replace(" ","_",$filename);
}
--
regards,
Tom