Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [PHP]nie wyświetla obrazów generowanych przez gd
lexter
post 26.09.2010, 16:10:18
Post #1





Grupa: Zarejestrowani
Postów: 9
Pomógł: 0
Dołączył: 7.04.2009

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


Witajcie, skrypt na 'captcha' ale nie generuje obrazków

Komunikat - Obrazek "http://localhost/captcha.php" nie może zostać wyświetlony, ponieważ zawiera błędy.


Błąd musi dotyczyć wyświetlania obrazka bo sam skrypt jest pobrany z FTP wydawnictwa Helion.


  1.  
  2. header("Content-type: image/png");
  3. imagecreatefrompng();
  4. imagepng($img);
  5.  


Moja wersja php 5.3

DG_VERSION 2.0.35

konfiguracja:

array(12) {
["GD Version"]=>
string(27) "bundled (2.0.34 compatible)"
["FreeType Support"]=>
bool(true)
["FreeType Linkage"]=>
string(13) "with freetype"
["T1Lib Support"]=>
bool(true)
["GIF Read Support"]=>
bool(true)
["GIF Create Support"]=>
bool(true)
["JPEG Support"]=>
bool(true)
["PNG Support"]=>
bool(true)
["WBMP Support"]=>
bool(true)
["XPM Support"]=>
bool(false)
["XBM Support"]=>
bool(true)
["JIS-mapped Japanese Font Support"]=>
bool(true)
}

Jedynie co się pojawia to ścieżka dostępu: http://localhost/captcha.php

dodałem też imagecreatefrompng();

Jaki może być inny powód że nie wyświetla obrazków?

Go to the top of the page
+Quote Post
nospor
post 27.09.2010, 09:23:06
Post #2





Grupa: Moderatorzy
Postów: 36 557
Pomógł: 6315
Dołączył: 27.12.2004




  1. header("Content-type: image/png");
  2. imagecreatefrompng();
  3. imagepng($img);

W tym kodzie brakuje wiele rzeczy, wiec nic dziwnego ze nie dziala.


--------------------

"Myśl, myśl, myśl..." - Kubuś Puchatek || "Manual, manual, manual..." - Kubuś Programista
"Szukaj, szukaj, szukaj..." - Kubuś Odkrywca || "Debuguj, debuguj, debuguj..." - Kubuś Developer

Go to the top of the page
+Quote Post

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 - 03:36