greengo Posted November 16, 2007 Share Posted November 16, 2007 hi everyone, I have this error "1296-972" from this line "$img = @imageCreateFromJPEG( $dir_photo.$file )or die ( E_ERROR ());" does anyone know what it means? thanks Quote Link to comment Share on other sites More sharing options...
Lumio Posted November 16, 2007 Share Posted November 16, 2007 PHP is case-sensitive... so imageCreateFromJPEG is not the same as imagecreatefromjpeg. Quote Link to comment Share on other sites More sharing options...
greengo Posted November 16, 2007 Author Share Posted November 16, 2007 nothing's changed Quote Link to comment Share on other sites More sharing options...
revraz Posted November 16, 2007 Share Posted November 16, 2007 Functions aren't. PHP is case-sensitive... so imageCreateFromJPEG is not the same as imagecreatefromjpeg. Quote Link to comment Share on other sites More sharing options...
revraz Posted November 16, 2007 Share Posted November 16, 2007 I've used this with success in another project $image = imagecreatefromjpeg("FSESig.jpg"); So I would try a couple of things. One, get rid of the @ so you can see if there are any other errors. Two, get rid of the space before $dir Three, try an absolute path or a jpg that is in the same folder. Quote Link to comment Share on other sites More sharing options...
greengo Posted November 16, 2007 Author Share Posted November 16, 2007 ??????????????????? Quote Link to comment Share on other sites More sharing options...
revraz Posted November 16, 2007 Share Posted November 16, 2007 How is my post confusing? Also, you didn't put your code on a single line did you? No need to have Quotes around it. Post the entire code before and after your $img line. Post what $dirphoto.$file equals. Quote Link to comment Share on other sites More sharing options...
greengo Posted November 16, 2007 Author Share Posted November 16, 2007 i'm sure u did though I need to know what that error means Quote Link to comment Share on other sites More sharing options...
revraz Posted November 16, 2007 Share Posted November 16, 2007 Can't help you if you don't provide the information I'm asking you. Quote Link to comment Share on other sites More sharing options...
greengo Posted November 16, 2007 Author Share Posted November 16, 2007 this's the function <?php function createFile($dir_photo) { $dir = opendir($dir_photo); //List files in images directory while (($file = readdir($dir)) !== false) { $ext = substr($file,strlen($file)-3); $ext = strtolower($ext); if($ext=="jpg") { $img = @imagecreatefromjpeg( $dir_photo.$file )or die ( E_ERROR ()); $width = ImageSX($img); $height = ImageSY( $img ); echo $width."-".$height; //echo $dir_photo.$file."</br>"; } } } createFile("photo/"); ?> Quote Link to comment Share on other sites More sharing options...
Lumio Posted November 17, 2007 Share Posted November 17, 2007 E_ERROR is not a function. It's a constant. change it to: or die("An error occured"); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.