Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP]Emotikony
xSlash
post
Post #1





Grupa: Zarejestrowani
Postów: 119
Pomógł: 0
Dołączył: 19.04.2009
Skąd: Sieradz

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


Jak zrobic, zeby w calym znaczniku <body> podmienialo np.:
":D" na "<img src="./image/emots/zeby.GIF">"

Wiem, ze nalezy (CHYBA) uzyc funkcji str_replace() ale ni jak nie moge tego zrobic...
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
xSlash
post
Post #2





Grupa: Zarejestrowani
Postów: 119
Pomógł: 0
Dołączył: 19.04.2009
Skąd: Sieradz

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


zrobilem tak:

index.php:

  1. <?php
  2. <html>
  3. <head></head>
  4. <body>
  5.       include "./emot.php";
  6.       
  7.       include "./body.php";
  8. </body>
  9. </html>
  10. ?>



emot.php:

  1. <?
  2.   str_replace(":D", '<img src="./image/emots/zeby.GIF">', file_get_contents('./body.php'));
  3. ?>


Pech chciał ze nie dziala  (IMG:http://forum.php.pl/style_emoticons/default/sadsmiley02.gif) (IMG:http://forum.php.pl/style_emoticons/default/sadsmiley02.gif) (IMG:http://forum.php.pl/style_emoticons/default/sadsmiley02.gif) (IMG:http://forum.php.pl/style_emoticons/default/sadsmiley02.gif) (IMG:http://forum.php.pl/style_emoticons/default/sadsmiley02.gif) (IMG:http://forum.php.pl/style_emoticons/default/sadsmiley02.gif)
Go to the top of the page
+Quote Post

Posty w temacie


Closed TopicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 8.10.2025 - 03:20