yami007 Posted October 8, 2009 Share Posted October 8, 2009 this is the code so far : <? Header("Content-type: image/png"); $im = ImageCreate(630,80); $blue = ImageColorAllocate($im,0x5B,0x69,0xA6); $white = ImageColorAllocate($im,255,255,255); $black = ImageColorAllocate($im,0,0,0); ImageTTFText($im, 45, 0, 10, 57, $black, "CANDY", $text); ImageTTFText($im, 45, 0, 6, 54, $white, "CANDY", $text); ImagePNG($im); ?> <IMG src="txt.php?text=<?echo urlencode($text)?>"> well this isnt my code, this is from the PHP ADVANCED TUTORIAL. i followed the example untill the end but i ddnt work and gave me that error. where is the problem?? Quote Link to comment Share on other sites More sharing options...
johnsmith153 Posted October 8, 2009 Share Posted October 8, 2009 last line: <IMG src="txt.php?text=<?echo urlencode($text)?>"> change to: <IMG src="txt.php?text=<?echo urlencode($text);?>"> Quote Link to comment Share on other sites More sharing options...
yami007 Posted October 8, 2009 Author Share Posted October 8, 2009 <IMG src="txt.php?text=<?echo urlencode($text);?>"> thanks, but it's still not working Quote Link to comment Share on other sites More sharing options...
johnsmith153 Posted October 8, 2009 Share Posted October 8, 2009 what is the error? Quote Link to comment Share on other sites More sharing options...
yami007 Posted October 8, 2009 Author Share Posted October 8, 2009 it's still giving this error : The image “http://localhost/test/create_png.php” cannot be displayed, because it contains errors. Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted October 9, 2009 Share Posted October 9, 2009 You cannot output image data and HTML on the same page. Quote Link to comment Share on other sites More sharing options...
yami007 Posted October 9, 2009 Author Share Posted October 9, 2009 yes thanks 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.