Jump to content

Recommended Posts

I'm receiving the following two errors. I understand why i'm receiving the errors, (file is no longer available on server). How do I prevent my script from writing an error to the log?

 

PHP Warning:  imagecreatefromjpeg(/2005/04/2946/imgExp/imgTmb/2946-101007.jpg) [<a href='function.imagecreatefromjpeg'>function.imagecreatefromjpeg</a>]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found

in /files/pvtexp.php on line 38

PHP Warning:  imagejpeg(): supplied argument is not a valid Image resource in /files/pvtexp.php on line 46

 

header("Content-type: image/jpeg");
if ($_GET['tmb'] == 1) {
$im = imagecreatefromjpeg('/'.$date.'/'.$mid.'/'.$type.'/imgTmb/'.$mid.'-'.$iid.'.jpg');
	} else {
$im = imagecreatefromjpeg('/'.$date.'/'.$mid.'/'.$type.'/'.$mid.'-'.$iid.'.jpg');		
}
imagejpeg($im);
imagedestroy($im);	

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.