Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP]dynamiczne tworzenie grafiki
-tomek41bdh-
post
Post #1





Goście







powiedzcie mi proszę, gdzie w tym kodzie jest błąd/czego brakuje bo jak chcę to zobaczyć, to nic mi nie wyświetla (IMG:http://forum.php.pl/style_emoticons/default/sad.gif)
podkreślam, że dopiero zaczynam w tej tematyce...

  1. <?php
  2.  $orange=imagecolorallocate($img,220,210,60); 
  3.  $white=imagecolorallocate($img,225,225,225); 
  4.  $black=imagecolorallocate($img,0,0,0); 
  5.  $blue=imagecolorallocate($img,0,0,225);
  6.  $red=imagecolorallocate($img,225,0,0);
  7.  $green=imagecolorallocate($img,0,225,0);
  8.  $yellow=imagecolorallocate($img,225,225,0);
  9.  $brown=imagecolorallocate($img,128,64,0);
  10.  $grey=imagecolorallocate($img,192,192,192);
  11.  ?>
  12. <?
  13. $img=imagecreate(50,30);
  14. ?>


z góry dzięki za pomoc (IMG:http://forum.php.pl/style_emoticons/default/smile.gif)
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
-tomek41bdh-
post
Post #2





Goście







nadal nie działa...
gdzie jest jeszcze błąd/brak czegoś (IMG:http://forum.php.pl/style_emoticons/default/questionmark.gif)
mam kod :

  1. <html>
  2. <head>
  3. <meta http-equiv="Content-type" content="text/html; charset=iso-8859-2" />
  4. <? 
  5.  header("Content-type: image/png"); 
  6. ?>
  7. </head>
  8. <body>
  9. <?
  10. $img=imagecreate(50,30);
  11. ?>
  12. <?php
  13.  $orange=imagecolorallocate($img,220,210,60); 
  14.  $white=imagecolorallocate($img,225,225,225); 
  15.  $black=imagecolorallocate($img,0,0,0); 
  16.  $blue=imagecolorallocate($img,0,0,225);
  17.  $red=imagecolorallocate($img,225,0,0);
  18.  $green=imagecolorallocate($img,0,225,0);
  19.  $yellow=imagecolorallocate($img,225,225,0);
  20.  $brown=imagecolorallocate($img,128,64,0);
  21.  $grey=imagecolorallocate($img,192,192,192);
  22.  ?>
  23.  
  24. <?
  25. imagepng(test.php)
  26. ?>
  27.  
  28. </body>
  29. </html>


dodam, że wszystko jest w pliku test.php ...
Go to the top of the page
+Quote Post

Posty w temacie


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

 



RSS Aktualny czas: 7.10.2025 - 16:53