Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Shoutbox nie działa :/
Lars
post
Post #1





Grupa: Zarejestrowani
Postów: 279
Pomógł: 15
Dołączył: 29.04.2005
Skąd: Gdynia

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


  1. <?php
  2.  
  3. if(!$_POST['shout']) {
  4. header(&#092;"Location: ../../index.php\");
  5. }
  6.  
  7. $shout_text=$_POST['shout'];
  8.  
  9. // formatowanie danych
  10.  
  11. $shout_text=stripslashes($shout_text);
  12. $shout_text=strip_tags($shout_text);
  13.  
  14. // koniec formatowania danych
  15.  
  16. $file=fopen(&#092;"shoutbox.dat\", \"r\");
  17. flock($file, 2);
  18. fwrite($file, &#092;"$shout_textn\");
  19. flock($file, 3);
  20. fclose($file);
  21.  
  22. header(&#092;"Location: ../../index.php\");
  23.  
  24. ?>


nie chodzi :/, chyba że zamiast $file=fopen("shoutbox.dat", "r");
wpiszę $file=fopen("shoutbox.dat", "w"); , a chcę, żeby dopisywał dane
na początku strony
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
Pigula
post
Post #2





Grupa: Zarejestrowani
Postów: 446
Pomógł: 0
Dołączył: 5.03.2005
Skąd: Lublin

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


Cytat(tiraeth @ 2005-06-21 09:37:59)
Ja sobie to interpretuje tak:
r - read (odczyt)
w - write (wpis)
a - add (dopis)

I polecam się tego trzymać

tylko ze a dopisuje do konca pliku a pytanie bylo o dopisanie na poczatku
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: 16.10.2025 - 21:00