3raser Posted March 17, 2012 Share Posted March 17, 2012 I'm starting to learn the image related functions with PHP. And I can't seem to get this image to work properly: <?php //set our page to display an image header ('Content-Type: image/png'); //create our image $img = @imagecreatetruecolor(450, 120); //create our white color $white = imagecolorallocate($img, 255, 255, 255); //create our string imgagestring($img, 1, 150, 60, 'Test', $white); imagepng($img); imagedestroy($img); ?> All I get is the img doesn't exist icon: http://osremake.org/test/index.php I've even looked up in the PHP manual to see if I'm doing anything wrong. :/ Link to comment https://forums.phpfreaks.com/topic/259098-why-is-the-image-broke/ Share on other sites More sharing options...
PFMaBiSmAd Posted March 17, 2012 Share Posted March 17, 2012 You have a typo in one of your function names. Temporarily comment out the header(); statement or setup your server to log php errors so that you can see any php reported errors. Link to comment https://forums.phpfreaks.com/topic/259098-why-is-the-image-broke/#findComment-1328318 Share on other sites More sharing options...
3raser Posted March 17, 2012 Author Share Posted March 17, 2012 .... Thank you. Link to comment https://forums.phpfreaks.com/topic/259098-why-is-the-image-broke/#findComment-1328322 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.