Posted by:
smiley76
(---.160.172.2.static.vsnl.net.in)
I am using wamp5 and tried running the code mentioned below but getting errors.
File name is test.php
<html>
<body>
I am using wamp5. Tried running the code mentioned below but getting errors
<?php header ("Content-type: image/png"
;
$im = @ImageCreate ( 50, 100)
or die ("Cannot create a new GD image."
;
$background_color = ImageColorAllocate ($im, 255, 255, 255);
$text_color = ImageColorAllocate ($im, 233, 14, 91);
ImageString ($im, 1, 5, 5, "A Simple Text String", $text_color );
ImagePng ($im);
?>
</body>
</html>
ERROR details:
Warning: Cannot modify header information - headers already sent by (output started at C:\wamp\www\test.php:8) in C:\wamp\www\test.php on line 8
PNG
i have enabled GD in wamp.Can anyone tell me why i am getting this error..