recent searches:
searching include ,
searching variable ,
searching post...
The Output Control functions allow you to control when output is sent from the script. This can be useful in several different situations, especially if you need to send headers to the browser after your script has began outputting data. The Output Control functions do not affect headers sent using header() or setcookie(), only functions such as echo() and data between blocks of PHP code.
Do zbudowania tego rozszerzenia nie są wymagane żadne zewnętrzne biblioteki.
By używać tych funkcji, nie trzeba niczego instalować. Są one częścią jądra PHP.
Na działanie tych funcji wpływają ustawienia zawarte w pliku php.ini.
Tabela 1. Output Control configuration options
| Name | Default | Changeable | Changelog |
|---|---|---|---|
| output_buffering | "0" | PHP_INI_PERDIR | |
| output_handler | NULL | PHP_INI_PERDIR | Available since PHP 4.0.4. |
| implicit_flush | "0" | PHP_INI_ALL | PHP_INI_PERDIR in PHP <= 4.2.3. |
Oto krótkie wyjaśnienie dyrektyw konfiguracji.
You can enable output buffering for all files by setting this directive to 'On'. If you wish to limit the size of the buffer to a certain size - you can use a maximum number of bytes instead of 'On', as a value for this directive (e.g., output_buffering=4096). As of PHP 4.3.5, this directive is always Off in PHP-CLI.
You can redirect all of the output of your scripts to a function. For example, if you set output_handler to mb_output_handler(), character encoding will be transparently converted to the specified encoding. Setting any output handler automatically turns on output buffering.
Notatka: You cannot use both mb_output_handler() with ob_iconv_handler() and you cannot use both ob_gzhandler() and zlib.output_compression.
FALSE by default. Changing this to TRUE tells PHP to tell the output layer to flush itself automatically after every output block. This is equivalent to calling the PHP function flush() after each and every call to print() or echo() and each and every HTML block.
When using PHP within an web environment, turning this option on has serious performance implications and is generally recommended for debugging purposes only. This value defaults to TRUE when operating under the CLI SAPI.
See also ob_implicit_flush().
To rozszerzenie nie posiada żadnych rodzajów zasobów.
To rozszerzenie nie posiada żadnych stałych.
In the above example, the output from echo() would be stored in the output buffer until ob_end_flush() was called. In the mean time, the call to setcookie() successfully stored a cookie without causing an error. (You can not normally send headers to the browser after data has already been sent.)
Notatka: When upgrading from PHP 4.1 (and 4.2) to 4.3 that due to a bug in earlier versions you must ensure that implict_flush is OFF in your php.ini, otherwise any output with ob_start() will not be hidden from output.
See also header() and setcookie().
| Poprzedni | Spis treści | Następny |
| ora_rollback | Początek rozdziału | flush |
Język PHP to dzisiaj powszechnie przyjęty standard, podstawa tworzenia dynamicznych stron WWW, opartych na bazach danych.
PHP to język skryptowy. Znaczy to, że jest to język nie kompilowalny. Program jest wykonywany przez interpreter na podstawie jego kodu źródłowego. Język PHP to element technologii internetowej SERVER-SIDE. Znaczy to, że kod języka jest wykonywany od strony serwera (na serwerze).
W jakim celu używac PHP? Po co to komu?
Załóżmy, że potrzebujemy takiej strony internetowej, która wyświetli zawsze bieżącą datę. Dzięki technologii PHP, datę i godzinę odczytywać można z miejsca gdzie wykonuje się skrypt, np. gdy serwer znajduje się w USA a my w Polsce to widoczna jest różnica w czasie który zostanie wyświetlony.
pierścionki tapety na telefon sprzedaż domen driver quady elektryczneusuwanie zmarszczek, usuwanie zmarszczek, kaszuby domki, agroturystyka kaszuby, hurtownia odzieży, wizy do rosji gdańsk, wizy do rosji gdańsk, Dotprint, eyeOS, Kredyty konsolidacyjny