![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 109 Pomógł: 0 Dołączył: 7.03.2004 Skąd: Szczecin|Bukowe Ostrzeżenie: (0%) ![]() ![]() |
Witam!
Zacząłem nauke generowania grafiki w php i mam problem. Napisałem skrypt, który rysuje prosty odcinek: [php:1:ba858e911f] <html> <head></head> <body> <?php $image=ImageCreate(200,200); $gray=ImageColorAllocate($image,204,204,204); $blue=ImageColorAllocate($image,0,0,255); ImageLine($image, 10,10, 150,30, $blue); ?> </body> </html> [/php:1:ba858e911f] Gdy wpisuje adres w przeglądarce wyświetla mi błąd: Kod Fatal error: Call to undefined function: imagecreate() in c:program filesapache groupapachehtdocsgrafika.php on line 5
Może to jakiś prosty błąd ale nie bardzo iwem co robie źle:/ |
|
|
![]() |
![]()
Post
#2
|
|
Grupa: Zarejestrowani Postów: 109 Pomógł: 0 Dołączył: 7.03.2004 Skąd: Szczecin|Bukowe Ostrzeżenie: (0%) ![]() ![]() |
Netzah mam tą linie(;extension=php_gd2.dll) w php.ini;)A napisany prez ciebie kod, po wpisaniu adresu do przeglądarki wyświetla:
Kod Warning: Cannot modify header information - headers already sent by (output started at c:program filesapache groupapachehtdocsgrafika.php:4) in c:program filesapache groupapachehtdocsgrafika.php on line 5
A oto kod pliku dla prypomnienia [php:1:d564dd0cb1] <html> <head></head> <body> <?php header("Content-type: image/png"); $image=@ImageCreate(200,200); $gray=ImageColorAllocate($image,204,204,204); $blue=ImageColorAllocate($image,0,0,255); ImageLine($image, 10,10, 150,30, $blue); imagePNG($image); ?> </body> </html> [/php:1:d564dd0cb1] |
|
|
![]() ![]() |
![]() |
Aktualny czas: 4.10.2025 - 01:55 |