Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [php] Dynamiczne generowanie obrazów, Jak podciągnąć zmienną z GET pod łącze?
olme
post
Post #1





Grupa: Zarejestrowani
Postów: 22
Pomógł: 0
Dołączył: 24.06.2006

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


  1. <?php
  2.  
  3. header("Content-type: image/png");
  4. $string = $_GET['text'];
  5. $im = imagecreatefrompng("next_station.png");
  6. $color = imagecolorallocate($im, 000, 000, 000);
  7. $px = (imagesx($im) - 3.60 * strlen($string)) / 2;
  8. imagestring($im, 43, $px, 4, $string, $color);
  9. imagepng($im);
  10. imagedestroy($im);
  11. ?>


Chciałbym, aby zmienna $text była wykorzystana także w linku, np.
  1. <?php
  2. <A HREF=$text.php>$text</A>
  3. ?>

Ale takie polecenie nic nie daje, wyświetla się tylko obraz.
Macie jakieś rady?


--------------------
Being a barber is a lot like being a barman or a soda jerk. There's not much to it once you've learned the basic moves. (...)
I just cut the hair.
Go to the top of the page
+Quote Post
spryciula
post
Post #2





Grupa: Zarejestrowani
Postów: 73
Pomógł: 0
Dołączył: 9.12.2006

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


nie masz zmiennej $text, zdefinowałeś zmienną $string

więc chyba o to ci chodziło


  1. <?php
  2. $string = $_GET['text']
  3. echo "<A HREF=$string.php>$string </A>";
  4. ?>


Ten post edytował spryciula 23.12.2006, 01:56:22
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 Aktualny czas: 20.08.2025 - 14:17