Jump to content

gd help


Gary Tactic

Recommended Posts

Hello,

I have written the following simple script to test whether my gd library is working properly.

[code]
header("Content-type: image/jpeg");
$im = imagecreatefromjpeg("./test.jpg");
imagejpeg($im,'',20);
imagedestroy($im);
[/code]

This returns an error referring to the first line of code regardless of what the line is.

I am sure this means my gd library doesn't work, but webhostfreaks says the gd library is installed fine.

any ideas of how i can get round this?

Gary
Link to comment
Share on other sites

[!--quoteo(post=365688:date=Apr 17 2006, 10:18 PM:name=obsidian)--][div class=\'quotetop\']QUOTE(obsidian @ Apr 17 2006, 10:18 PM) [snapback]365688[/snapback][/div][div class=\'quotemain\'][!--quotec--]
what's the error?
[/quote]

Parse error: syntax error, unexpected T_STRING on line 2

referring to:

header("Content-type: image/jpeg");
Link to comment
Share on other sites

[!--quoteo(post=365697:date=Apr 17 2006, 05:32 PM:name=Gary Tactic)--][div class=\'quotetop\']QUOTE(Gary Tactic @ Apr 17 2006, 05:32 PM) [snapback]365697[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Parse error: syntax error, unexpected T_STRING on line 2

referring to:

header("Content-type: image/jpeg");
[/quote]

you may just need to get rid of any white space above the header() call.
Link to comment
Share on other sites

[!--quoteo(post=365707:date=Apr 17 2006, 10:55 PM:name=obsidian)--][div class=\'quotetop\']QUOTE(obsidian @ Apr 17 2006, 10:55 PM) [snapback]365707[/snapback][/div][div class=\'quotemain\'][!--quotec--]
you may just need to get rid of any white space above the header() call.
[/quote]

Wow, thank you very much, that error was driving me mad!
Link to comment
Share on other sites

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.