Andsch
26.08.2006, 16:40:42
Hi,ich bekomme mit diesem Script:
<?php
// Header (MIME-Typ)
header('Content-type: image/png');
// Image-Objekt erzeugen
$bild = imagecreate(200, 200); //line 7
// Farbwerte festlegen
$hintergrund = imagecolorallocate($bild, 0xFF, 0xFF, 0xFF);
$farbeGrau = imagecolorallocate($bild, 0xC0, 0xC0, 0xC0);
$farbeDunkelGrau = imagecolorallocate($bild, 0x90, 0x90, 0x90);
$farbeBlau = imagecolorallocate($bild, 0x00, 0x00, 0x80);
$farbeDunkelBlau = imagecolorallocate($bild, 0x00, 0x00, 0x50);
$farbeRot = imagecolorallocate($bild, 0xFF, 0x00, 0x00);
$farbeDunkelRot = imagecolorallocate($bild, 0x90, 0x00, 0x00);
// 3D Effekt simulieren
for ($i = 60; $i > 50; $i--) {
imagefilledarc($bild, 50, $i, 100, 50, 0, 55, $farbeDunkelBlau, IMG_ARC_PIE);
imagefilledarc($bild, 50, $i, 100, 50, 55, 135 , $farbeDunkelGrau, IMG_ARC_PIE);
imagefilledarc($bild, 50, $i, 100, 50, 135, 360 , $farbeDunkelRot, IMG_ARC_PIE);
}
// Eigentliches Diagramm
imagefilledarc($bild, 50, 50, 100, 50, 0, 55, $farbeBlau, IMG_ARC_PIE);
imagefilledarc($bild, 50, 50, 100, 50, 55, 135 , $farbeGrau, IMG_ARC_PIE);
imagefilledarc($bild, 50, 50, 100, 50, 135, 360 , $farbeRot, IMG_ARC_PIE);
// Diagramm ausgeben und Grafik
// aus dem Speicher entfernen
imagepng($bild);
imagedestroy($bild);
?>
folgenden Fehlercode:
Fatal error: Call to undefined function imagecreate() in d:\wamp\www\diagramm.php</b> on line7<br />
<?php
// Header (MIME-Typ)
header('Content-type: image/png');
// Image-Objekt erzeugen
$bild = imagecreate(200, 200); //line 7
// Farbwerte festlegen
$hintergrund = imagecolorallocate($bild, 0xFF, 0xFF, 0xFF);
$farbeGrau = imagecolorallocate($bild, 0xC0, 0xC0, 0xC0);
$farbeDunkelGrau = imagecolorallocate($bild, 0x90, 0x90, 0x90);
$farbeBlau = imagecolorallocate($bild, 0x00, 0x00, 0x80);
$farbeDunkelBlau = imagecolorallocate($bild, 0x00, 0x00, 0x50);
$farbeRot = imagecolorallocate($bild, 0xFF, 0x00, 0x00);
$farbeDunkelRot = imagecolorallocate($bild, 0x90, 0x00, 0x00);
// 3D Effekt simulieren
for ($i = 60; $i > 50; $i--) {
imagefilledarc($bild, 50, $i, 100, 50, 0, 55, $farbeDunkelBlau, IMG_ARC_PIE);
imagefilledarc($bild, 50, $i, 100, 50, 55, 135 , $farbeDunkelGrau, IMG_ARC_PIE);
imagefilledarc($bild, 50, $i, 100, 50, 135, 360 , $farbeDunkelRot, IMG_ARC_PIE);
}
// Eigentliches Diagramm
imagefilledarc($bild, 50, 50, 100, 50, 0, 55, $farbeBlau, IMG_ARC_PIE);
imagefilledarc($bild, 50, 50, 100, 50, 55, 135 , $farbeGrau, IMG_ARC_PIE);
imagefilledarc($bild, 50, 50, 100, 50, 135, 360 , $farbeRot, IMG_ARC_PIE);
// Diagramm ausgeben und Grafik
// aus dem Speicher entfernen
imagepng($bild);
imagedestroy($bild);
?>
folgenden Fehlercode:
Fatal error: Call to undefined function imagecreate() in d:\wamp\www\diagramm.php</b> on line7<br />