FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Failed @getimagesize() print to error_log?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Failed @getimagesize() print to error_log? [message #173066] Sun, 20 March 2011 01:58 Go to previous message
jwcarlton is currently offline  jwcarlton
Messages: 76
Registered: December 2010
Karma:
Member
I have the following in a script:

if (($image) && (@getimagesize("/home/myaccount/www/thumbs/$image")))
$height = "75";

else {
$image = "noimage.gif";
$height = "75";
}


And I have a gazillion of these in my error log:

File does not exist: /home/myaccount/public_html/thumbs/
some_image_name.jpg


This is the only script that refers to the "thumbs" directory (as far
as I know), so I'm pretty sure that this is the culprit.
Unfortunately, the error_log isn't giving a referer, so I'm not 100%
sure that the references aren't coming from something like Google
Images.

Would a failed @getimagesize() write to the error_log? If so, would it
be better to use is_readable()?

if (($image) && (is_readable("/home/myaccount/www/thumbs/$image")))
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: PDO MySQL
Next Topic: Very strange behaviour of imageftbbox()?
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Nov 30 09:13:55 GMT 2024

Total time taken to generate the page: 0.04569 seconds