Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Nowa linia z pliku, podczas pobierania z niego danych
xblant
post
Post #1





Grupa: Zarejestrowani
Postów: 76
Pomógł: 0
Dołączył: 31.01.2006

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


mam funkcje :
  1. <?php
  2.  
  3. function viev_log($date)
  4. {
  5. $file = "logs/".$date.".txt";
  6. $handle = fopen($file, "r");
  7. $log = fread($handle, filesize($file));
  8. fclose($handle);
  9. echo $log;
  10. }
  11. //wywolanie
  12. viev_log("07-02-2006");
  13.  
  14. ?>

w pliku jest np. :
Kod
Co: "404", IP: "81.168.176.17", Plik: "log.php", Url: "http://members.lycos.co.uk/xplanet/xplanet%20v.2.0/log.php", Kiedy: "07.02.2006 16:59:44".
Co: "404", IP: "81.168.176.17", Plik: "log.php", Url: "http://members.lycos.co.uk/xplanet/xplanet%20v.2.0/log.php", Kiedy: "07.02.2006 16:59:57".
Co: "404", IP: "81.168.176.17", Plik: "log.php", Url: "http://members.lycos.co.uk/xplanet/xplanet%20v.2.0/log.php", Kiedy: "07.02.2006 17:16:09".
Co: "404", IP: "81.168.176.17", Plik: "log.php", Url: "http://members.lycos.co.uk/xplanet/xplanet%20v.2.0/log.php", Kiedy: "07.02.2006 17:40:48".
Co: "404", IP: "81.168.176.17", Plik: "logs.php", Url: "http://members.lycos.co.uk/xplanet/xplanet%20v.2.0/logs.php", Kiedy: "07.02.2006 17:53:13".
Co: "404", IP: "81.168.176.17", Plik: "logs.php", Url: "http://members.lycos.co.uk/xplanet/xplanet%20v.2.0/logs.php", Kiedy: "07.02.2006 17:53:50".

i wyświetla mi to tak :
Kod
Co: "404", IP: "81.168.176.17", Plik: "log.php", Url: "http://members.lycos.co.uk/xplanet/xplanet%20v.2.0/log.php", Kiedy: "07.02.2006 16:59:44". Co: "404", IP: "81.168.176.17", Plik: "log.php", Url: "http://members.lycos.co.uk/xplanet/xplanet%20v.2.0/log.php", Kiedy: "07.02.2006 16:59:57". Co: "404", IP: "81.168.176.17", Plik: "log.php", Url: "http://members.lycos.co.uk/xplanet/xplanet%20v.2.0/log.php", Kiedy: "07.02.2006 17:16:09". Co: "404", IP: "81.168.176.17", Plik: "log.php", Url: "http://members.lycos.co.uk/xplanet/xplanet%20v.2.0/log.php", Kiedy: "07.02.2006 17:40:48". Co: "404", IP: "81.168.176.17", Plik: "logs.php", Url: "http://members.lycos.co.uk/xplanet/xplanet%20v.2.0/logs.php", Kiedy: "07.02.2006 17:53:13". Co: "404", IP: "81.168.176.17", Plik: "logs.php", Url: "http://members.lycos.co.uk/xplanet/xplanet%20v.2.0/logs.php", Kiedy: "07.02.2006 17:53:50".

i jak to zmienić żeby wyświetlało ze znakami nowej lini (IMG:http://forum.php.pl/style_emoticons/default/questionmark.gif) (IMG:http://forum.php.pl/style_emoticons/default/questionmark.gif)

Ten post edytował xblant 8.02.2006, 14:38:05
Go to the top of the page
+Quote Post

Posty w temacie
- xblant   Nowa linia z pliku   7.02.2006, 18:11:58
- - mike_mech   1. Zły bbCode, proszę poprawić! 2. Przenoszę...   7.02.2006, 18:23:37


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: 25.08.2025 - 02:23