Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP]Tworzenie obrazka (GD) nie działa, Pokazują się znaczki zamiast obrazka
webspy
post 15.01.2010, 22:20:10
Post #1





Grupa: Zarejestrowani
Postów: 186
Pomógł: 9
Dołączył: 3.03.2008

Ostrzeżenie: (0%)
-----


Witam mam najprostszy kod php do tworzenia obrazka z tekstem wygląda on tak:
  1. <?php
  2. // Create a 100*30 image
  3. $im = imagecreate(100, 30);
  4.  
  5. // White background and blue text
  6. $bg = imagecolorallocate($im, 255, 255, 255);
  7. $textcolor = imagecolorallocate($im, 0, 0, 255);
  8.  
  9. // Write the string at the top left
  10. imagestring($im, 5, 0, 0, 'Hello world!', $textcolor);
  11.  
  12. // Output the image
  13. header('Content-type: image/png');
  14.  
  15. imagepng($im);
  16. imagedestroy($im);
  17. ?>

po wyswietleniu strony wyskakuje zamiast obrazka coś takiego �PNG 
W czym tkwi problem?questionmark.gif
Sprawdzałem czy na serwerze posiadam biblioteke GD takim oto kodem:

  1. <?php
  2. print_r(gd_info());
  3. ?>


Wynikiem tego było: Array ( [GD Version] => 2.0 or higher [FreeType Support] => 1 [FreeType Linkage] => with freetype [T1Lib Support] => 1 [GIF Read Support] => 1 [GIF Create Support] => 1 [JPG Support] => 1 [PNG Support] => 1 [WBMP Support] => 1 [XPM Support] => [XBM Support] => [JIS-mapped Japanese Font Support] => )

Z góry dziękuję za pomoc.
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 15.08.2025 - 02:13