Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> emotikonki, class
Raffal
post
Post #1





Grupa: Zarejestrowani
Postów: 111
Pomógł: 0
Dołączył: 19.06.2006

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


Witam (IMG:http://forum.php.pl/style_emoticons/default/exclamation.gif)
mam problem chce zrobic rozpoznywanie emotikonek wiec...poszukalem na forum i znalazlem tutka
no i przystapilem do pracy moj efekt

Warning: main(buzka.php): failed to open stream: No such file or directory in /home/accounts_r/raffal/public_html/sysnews2.php on line 68

Warning: main(): Failed opening 'buzka.php' for inclusion (include_path='.:/var/iws/php/php4-fcgi/lib/php') in /home/accounts_r/raffal/public_html/sysnews2.php on line 68

tak wyglada class.php
  1. <?
  2. class buzki
  3. {
  4. var $src;
  5. var $buzki;
  6. var $format;
  7.  
  8.  
  9. function sciezki( $tablica ) 
  10. { 
  11. foreach( $tablica AS $index => $wartosc ) { 
  12. $gotowa[] = '<img src="' . $this -> pliki . $wartosc . '.' . $this -> format . '">'; 
  13. } 
  14. return $gotowa; 
  15. } 
  16.  
  17.  function Buzki() 
  18. { 
  19. include( './config.php' ); 
  20. $this -> sciezka = $sc; 
  21. $this -> format = $format; 
  22. $this -> buzki = $buzki; 
  23.  
  24.  $this -> pliki = $this -> sciezki( array_flip( $buzki ) ); 
  25. } 
  26.  
  27.  function zamien( $tekst ) 
  28. { 
  29. $wynik = preg_replace( $this -> buzki, $this -> pliki, $tekst ); 
  30. return $wynik; 
  31. } 
  32.  
  33. ?>


a tak
config.php
  1. <!--config.php-->
  2. <?php
  3. $src= '/buzki/';
  4. $format='gif'
  5.  
  6. $buzki= array(
  7. "smile" => '/:)/', 
  8. "sad" => '/:(/', 
  9. "happy" => '/:D/', 
  10. "angry" => '/:[/',
  11. "crying" => '/;(/',
  12. "laughing" => '/;)/',
  13. "wassat" => '/;[/',
  14. "wink" => '/;)/',
  15. );
  16. >?
  17. ?>


a tak wywoluje
  1. <?php
  2. include("buzka.php");
  3. ?>



moge prosic o pomoc..........
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: 15.10.2025 - 11:01