Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [PHP]imagecreatefromgif, Biblioteka GD
Wertas
post
Post #1





Grupa: Zarejestrowani
Postów: 45
Pomógł: 0
Dołączył: 2.03.2010

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


Otóż chcę aby dopisać do mojego kodu zmienną

  1. $src = imagecreatefromgif('http://kavvson.pl/templates/subSilver/images/custom_fields/'.$stats['user_field_3'].'.gif');
  2. $src2 = imagecreatefromgif('http://kavvson.pl/templates/subSilver/images/custom_fields/3a.gif');
  3. // Copy
  4. imagecopy($img, $src, 140, 55, 1, 2, 21,17);
  5. imagecopy($img, $src2, 140, 35, 1, 2, 21,17);


Lecz to się nie udaje (IMG:style_emoticons/default/sad.gif)

Pisze że nie można utworzyć obrazka.

Natomiast przy

  1. $src = imagecreatefromgif('http://kavvson.pl/templates/subSilver/images/custom_fields/1.gif');


czyli zamiast $stats['user_field_3'] damy 1,2,3 jakąś liczbę to pokaże

Pole to $stats['user_field_3'] zwraca liczba.gif
Go to the top of the page
+Quote Post
potreb
post
Post #2





Grupa: Zarejestrowani
Postów: 1 568
Pomógł: 192
Dołączył: 7.03.2005
Skąd: Warszawa

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


To sprawdź czy na pewno zwraca coś $stats['user_field_3']
Go to the top of the page
+Quote Post
Wertas
post
Post #3





Grupa: Zarejestrowani
Postów: 45
Pomógł: 0
Dołączył: 2.03.2010

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


Tak 1.gif w tym wypadku
Go to the top of the page
+Quote Post
#luq
post
Post #4





Grupa: Zarejestrowani
Postów: 589
Pomógł: 91
Dołączył: 22.05.2008
Skąd: Gliwice

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


No to pytanie: jeśli:

Kod
$stats['user_field_3'] == '1.gif';


to jaki będzie ciąg:
Kod
'http://kavvson.pl/templates/subSilver/images/custom_fields/'.$stats['user_field_3'].'.gif'

?
Go to the top of the page
+Quote Post
Wertas
post
Post #5





Grupa: Zarejestrowani
Postów: 45
Pomógł: 0
Dołączył: 2.03.2010

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


Nie bo beda 2x .gif?
Go to the top of the page
+Quote Post

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: 23.08.2025 - 08:54