I have this code:
<html>
<?php
header('Content-type: image/png');
$png_image = imagecreate(150, 150);
imagecolorallocate($png_image, 15, 142, 210);
$black = imagecolorallocate($png_image, 0, 0, 0);
imageline($png_image, 0, 0, 150, 150, $black);
imagepng($png_image);
imagedestroy($png_image);
?>
</html>
And this is the result that webpage shows:
http://asgarnian.net78.net/drawimage.php
Why is it not working, I checked this Host Settings and it does have GD support. What am I missing? Are there any settings I need to set?
This is in my php info:
'--with-gd=/usr' '--enable-gd-native-ttf' '--with-jpeg-dir=/usr' '--with-png-dir=/usr' '--with-zlib-dir=/usr' '--with-xpm-dir=/usr' '--with-ttf=/usr' '--with-freetype-dir=/usr' '--with-t1lib=/usr' '--with-gettext=/usr' '--with-gmp=/usr'
so I guess it should work? also the Php code was directly copied from some php tutorial site...