Fatal error

wxdqz

New Member
This is my problem, what did I don wrong??

<br>
<b>Fatal error</b>: Call to undefined function: imagecreate() in <b>C:\apache\htdocs\image_example.php</b> on line <b>7</b><br>

Sourec code:

<?
Header("Content-Type: image/png");
//phpinfo();
$img_width = 500;
$img_height = 200;

$id = ImageCreate($img_width,$img_height);

$black = ImageColorAllocate($id, 0, 0, 0);
$white = ImageColorAllocate($id, 255, 255, 255);


ImageFill($id, 0,0, $white);

imagerectangle($id, 0,0 , $img_width-1,$img_height-1 , $black);
$fp = fopen("data.txt", "r");

for ($H = 0; $H < 10; $H++) {


$data[$H]= 10*fgets($fp,4096);
}

$xx=0;
$yy=$data[0];
for ($i = 0; $i < 10; $i++) {
$x=$i*50;
$y=$img_height-$data[$i];
imageline($id, $xx,$yy , $x, $y , $blue);
$xx=$x;
$yy=$y;
}
ImagePNG($id);
?>

I use PHP 4.0.5 and I have also tryed PHP 4.1.0.

I use also Apache/1.3.14 Server

What is my problem and what must I Do

Greetings Kees Hofman,
the Netherlands
 
Back
Top