Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: [php] imagettftext() problem :(
Forum PHP.pl > Forum > Przedszkole
kt1
Mam taki kod
  1. <? header("Content-type: image/png"); $im = imagecreatefrompng("brak.PNG"); $user ='Twóje ip :'.$_SERVER['REMOTE_ADDR'].'; Twój host '.gethostbyaddr($_SERVER['REMOTE_ADDR']).'; Przeglodarka :'.$_SERVER['HTTP_USER_AGENT'].''; $blue = imagecolorallocate($im, 255, 255, 255); imagefill($im, 0, 0, $green); imagettftext($im, 10, 0, 120, 40, $blue, "verdana.ttf", "$user"); imagepng($im); imagedestroy($im); ?>

i bład jest taki
  1. <br /> <b>Fatal error</b>: Call to undefined function: imagettftext() in <b>/mnt/storage2/vhosts/man_a/www/html/a.php</b> on line <b>9</b><br />


i nie wiem co jest grane prosze o pomoc
na localhost działa
nospor
zgodnie z tym co glosi komunikat, wywolujesz funkcje, ktorej nie ma. Czego z tego nie rozumiesz? Nie ma to nie ma tongue.gif

Zajrzyj do manuala:
http://pl.php.net/manual/pl/function.imagettftext.php
a dowiesz sie, ze:
Cytat
Notatka: This function requires both the GD library and the » FreeType library.

Ciut jasniej?
kt1
Zrobiłem teraz tak
  1. <? header("Content-type: image/png"); 
  2.  $im = imagecreatefrompng("brak.PNG"); 
  3.  $user ='Twóje ip :'.$_SERVER['REMOTE_ADDR'].'; Twój host '.gethostbyaddr($_SERVER['REMOTE_ADDR']).'; Przeglodarka :'.$_SERVER['HTTP_USER_AGENT'].'';
  4. $blue = imagecolorallocate($im, 255, 255, 255);
  5. imagefill($im, 0, 0, $green);
  6. ImageString($im, 4, 0, 120, 'fafaaaaaaaaaa', $blue);
  7. imagepng($im); 
  8.  imagedestroy($im); 
  9.  ?>

teraz obrazek sie wyswietla ale nie ma napisu co jest zle questionmark.gif?
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.