cathay123 -
Joined: 25 Jun 2010 Posts: 1
|
Posted: Wed Jun 30, 2010 8:07 am Post subject: [Help] GD Problems |
|
|
Hello:
I got some problems with GD libraries in my PHP (5.1.4) scripts. I'm sure i set my extension dir in PHP.INI and uncommented php_gd2.dll correctly. But browser shows a sequence of strange caracters When i try this simple script :
<?php
$height = 15;
$width = 100;
$immagine = imagecreate($width, $height);
$bg = imagecolorallocate($immagine, 255, 255, 255); // bianco
$barra = imagecolorallocate($immagine, 0, 255, 0);
imagefilledrectangle($immagine, 0, 0, $width, $height, $barra);
imagerectangle($immagine, 0, 0, $width, $height, $bg);
header("Content-type: image/png");
imagepng($immagine);
imagedestroy($immagine);
?>
Thanks for help.
Cathay |
|