If you are using mod_gzip or mod_deflate to compress HTML output, you're not able to send partial file to the browser....
To disable mod_deflate in PHP (if needed), you can tell Apache with this :
apache_setenv('no-gzip', '1');
(PHP 4 >= 4.2.0, PHP 5, PHP 7)
apache_setenv — Ustawia zmienną Apache subprocess_env
$variable
, string $value
[, bool $walk_to_top
= FALSE
] ) : bool
apache_setenv() ustawia wartość zmiennej środowiskowej
Apache, określonej przez
variable
.
Informacja:
Gdy ustawiana jest zmienna środowiskowa Apache, odpowiadająca zmienna w tablicy $_SERVER nie jest zmieniana.
variable
Zmienna środowiskowa do ustawienia.
value
Nowa wartość zmiennej variable
.
walk_to_top
Czy ustawić zmienną górnego poziomu dostępną dla wszystkich warstw Apache.
Zwraca TRUE
w przypadku powodzenia, FALSE
w
przypadku błędu.
Przykład #1 Ustawianie zmiennej środowiskowej Apache używając apache_setenv()
<?php
apache_setenv("EXAMPLE_VAR", "Przykładowa wartość");
?>
Informacja:
apache_setenv() może być użyta z apache_getenv() pomiędzy różnymi stronami lub dla ustawienia zmiennych przekazanych do Server Side Includes (.shtml), które zostały dołączone w skryptach PHP.
If you are using mod_gzip or mod_deflate to compress HTML output, you're not able to send partial file to the browser....
To disable mod_deflate in PHP (if needed), you can tell Apache with this :
apache_setenv('no-gzip', '1');
If you set a variable, either new or existing, the corresponding $_SERVER variable is not changed, and you will have to change it as well.
When you need to set the QUERY_STRING variable into a page included with the "virtual" function do this:
virtual ("some_page.shtml?$QUERY_STRING");
apache_setenv does not work for this case.
When you want to set variables to pass to Server Side Includes (.shtml) included in PHP scripts, use this.