Hallo nochmal,
habe noch ein weiteres Problem. Das Bild und der Text werden korrekt angezeigt. Das Ganze teste ich grad lokal mit XamPP!
Trotzdem erscheinen folgende Fehlermeldungen:
----
Warning: imagecreatefrompng(captcha.png) [function.imagecreatefrompng]: failed to open stream: No such file or directory in C:\xampp\htdocs\guestbook\captcha\captcha.php on line 25
Warning: imagecolorallocate(): supplied argument is not a valid Image resource in C:\xampp\htdocs\guestbook\captcha\captcha.php on line 26
Warning: imagettftext() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\guestbook\captcha\captcha.php on line 32
Warning: imagepng(): supplied argument is not a valid Image resource in C:\xampp\htdocs\guestbook\captcha\captcha.php on line 33
Warning: imagedestroy(): supplied argument is not a valid Image resource in C:\xampp\htdocs\guestbook\captcha\captcha.php on line 34
----
Nachfolgend die Zeilen der captcha.php:
----
$img = ImageCreateFromPNG('captcha.png'); //Backgroundimage
$color = ImageColorAllocate($img, 0, 0, 0); //Farbe
$ttf = $_SERVER['DOCUMENT_ROOT']."/guestbook/captcha/xfiles.ttf"; //Schriftart
$ttfsize = 20; //Schriftgrösse
$angle = rand(0,5);
$t_x = rand(5,30);
$t_y = 35;
imagettftext($img, $ttfsize, $angle, $t_x, $t_y, $color, $ttf, $text);
imagepng($img);
imagedestroy($img);
----
Blicke ich grad nicht durch. Hat jemand ´nen Plan?
Gruß, Alex
