Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Przekierowanie po x sekundach?
Mazur_pl
post
Post #1





Grupa: Zarejestrowani
Postów: 87
Pomógł: 0
Dołączył: 11.05.2007

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


Siema, mam powiedzmy plik wyloguj.php:

  1. <?php
  2.  
  3.  
  4. echo("Wylogowales sie");
  5. ?>


I teraz chciałbym zrobić aby wyświetliło wylogowałeś sie a po 5 sekundach header("Location: index.php"); .
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
siemakuba
post
Post #2





Grupa: Przyjaciele php.pl
Postów: 1 112
Pomógł: 20
Dołączył: 10.04.2005

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


  1. <?php
  2. echo 'Wyswietlam od razu';
  3. sleep(3);
  4. echo '<br>Wyswietlam po 3 sekundach';
  5. ?>


Trzeba tylko mieć na uwadze, co manual mówi na temat funkcji flush" title="Zobacz w manualu PHP" target="_manual:
Cytat
Several servers, especially on Win32, will still buffer the output from your script until it terminates before transmitting the results to the browser.


pozdr.
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: 7.10.2025 - 07:04