Post
#1
|
|
|
Grupa: Zarejestrowani Postów: 220 Pomógł: 0 Dołączył: 20.02.2003 Skąd: Poznań Ostrzeżenie: (0%)
|
Pytanie: jak obejść "ograniczenie" php, które wymusza użycie header("Location: ") przed wysłaniem danych do przeglądarki?
W dokumentcji można przeczytać: Cytat Note: As of php 4, you can use output buffering to get around this problem, with the overhead of all of your output to the browser being buffered in the server until you send it. You can do this by calling manual/en/function.ob-start.php" target="_blank and manual/en/function.ob-end-flush.php" target="_blank in your script, or setting the output_buffering configuration directive on in your php.ini or server configuration files.
|
|
|
|
![]() |
Post
#2
|
|
|
Grupa: Przyjaciele php.pl Postów: 1 717 Pomógł: 0 Dołączył: 12.06.2002 Skąd: Wolsztyn..... Studia: Zielona Góra Ostrzeżenie: (0%)
|
Przede wszystkim to nie jest ograniczenie php, tylko protokolu HTTP.
Po drugie to, ze masz problem z "headers already sent" z reguly swiadczy o zlym zaplanowaniu kodu, wszystko da sie zrobic bez problemu, trzeba tylko chciec i troszke pomyslec. Po trzecie jak juz naprawde chcesz skorzystac z output buffering to raczej rob to w skrypcie korzystajac z funkcji ob_*, ze wzgledu na to, ze innym serwerze niz Twoj skrypty moga nie dzialac, jak nie bedziesz mial dostepu do konfiguracji, zeby wlaczyc buforowanie. |
|
|
|
escaflowne Header("location: ") 23.08.2004, 14:11:31
Yarecki Sam sobie odpowiedziałeś. Inny sposób poza podanym... 23.08.2004, 14:16:04
escaflowne Kumam po angielsku, ale niektórych słów z powyższe... 23.08.2004, 14:30:51 ![]() ![]() |
|
Aktualny czas: 31.12.2025 - 18:38 |