[Newbie] Image Module needed ?
| From: | Alain "\"Cyb\" | Date: | Tue, 09 Jan 2001 14:00:51 +0000 |
| Subject: | [Newbie] Image Module needed ? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-33456@lists.php.net to get a copy of this message | ||
Howdy,
Stipid question, Why do I have the following code being output as plain
text ?(yes, even the "<?" and "?>" are being written).
It's supposed to be an Image. I do have the GD lib running... (Tried
with Gif, Jpg, Png...)
Cheers,
Alain
CODE:
<?
// send header
Header("Content-Type: image/gif");
// create image and colours
$im = ImageCreate(500, 75);
$red = ImageColorAllocate($im, 255, 0, 0);
$black = ImageColorAllocate($im, 0, 0, 0);
// fill image
ImageFill($im, 0, 0, $red);
// write string at (210,30) in black
ImageString($im, 4, 210, 30, "Hello John", $black);
// release image
ImageGIF($im);
?>