PHP handleiding

PHP TUIS PHP Inleiding PHP installeer PHP sintaksis PHP opmerkings PHP veranderlikes PHP Echo / Druk PHP datatipes PHP Strings PHP-nommers PHP Wiskunde PHP konstante PHP-operateurs PHP As...Anders...Elseif PHP skakelaar PHP-lusse PHP funksies PHP-skikkings PHP Superglobals PHP RegEx

PHP- vorms

PHP-vormhantering PHP-vorm validering PHP-vorm word vereis PHP-vorm URL/e-pos PHP-vorm voltooi

PHP Gevorderd

PHP datum en tyd PHP sluit in PHP-lêerhantering PHP-lêer oop/lees PHP-lêer skep/skryf PHP-lêer oplaai PHP-koekies PHP-sessies PHP filters PHP-filters Gevorderd PHP-terugbelfunksies PHP JSON PHP-uitsonderings

PHP OOP

PHP Wat is OOP PHP Klasse/Objekte PHP Konstrukteur PHP vernietiger PHP Toegangswysigers PHP erfenis PHP konstante PHP Abstrakte Klasse PHP-koppelvlakke PHP eienskappe PHP statiese metodes PHP Statiese Eienskappe PHP naamruimtes PHP Iterables

MySQL- databasis

MySQL-databasis MySQL Connect MySQL Skep DB MySQL Skep tabel MySQL Voeg data in MySQL Kry Laaste ID MySQL Voeg veelvuldige in MySQL voorberei MySQL Kies Data MySQL Waar MySQL Bestel deur MySQL verwyder data MySQL-opdateringsdata MySQL-limietdata

PHP XML

PHP XML-ontleders PHP SimpleXML-ontleder PHP SimpleXML - Kry PHP XML Expat PHP XML DOM

PHP - AJAX

AJAX Intro AJAX PHP AJAX-databasis AJAX XML AJAX Live Search AJAX-peiling

PHP voorbeelde

PHP voorbeelde PHP samesteller PHP vasvra PHP Oefeninge PHP-sertifikaat

PHP- verwysing

PHP Oorsig PHP Skikking PHP-kalender PHP datum PHP gids PHP fout PHP-uitsondering PHP lêerstelsel PHP filter PHP FTP PHP JSON PHP sleutelwoorde PHP Libxml PHP-pos PHP Wiskunde PHP Diverse PHP MySQLi PHP-netwerk PHP-uitsetbeheer PHP RegEx PHP SimpleXML PHP-stroom PHP-string PHP veranderlike hantering PHP XML-ontleder PHP zip PHP Tydsones

PHP ob_start() Funksie

❮ PHP-uitsetbeheerfunksies

Voorbeeld

Skep 'n uitsetbuffer:

<?php
ob_start();
echo "This content will not be sent to the browser.";
ob_end_clean();

echo "This content will be sent to the browser.";
?>

Definisie en gebruik

Die ob_start()funksie skep 'n uitsetbuffer. 'n Terugbelfunksie kan deurgegee word om verwerking op die inhoud van die buffer te doen voordat dit uit die buffer gespoel word. Vlae kan gebruik word om toe te laat of te beperk wat die buffer in staat is om te doen.


Sintaksis

ob_start(callback, chunk_size, flags);

Parameterwaardes

Parameter Description
callback Optional. A callback used to process the contents of the buffer before it gets flushed.

The callback function should have the following parameters:
Parameter Description
buffer The contents of the output buffer
phase A bitmask which may have any number of the following flags:
PHP_OUTPUT_HANDLER_START - If the output buffer was just created
PHP_OUTPUT_HANDLER_FLUSH - If the output buffer is currently being flushed
PHP_OUTPUT_HANDLER_FINAL - If the output buffer will be deleted right after this operation
chunk_size Optional. Defaults to 0. When set to a value greater than zero, the buffer will automatically be flushed as soon as the length of the contents exceeds this value
flags Optional. Defaults to PHP_OUTPUT_HANDLER_STDFLAGS.

A bitmask which determines what operations the buffer is permitted to do. It may contain the following flags:

PHP_OUTPUT_HANDLER_CLEANABLE - Calls to ob_clean(), ob_end_clean() and ob_get_clean() are permitted.

PHP_OUTPUT_HANDLER_FLUSHABLE - Calls to ob_flush(), ob_end_flush() and ob_get_flush() are permitted.

PHP_OUTPUT_HANDLER_REMOVABLE - Calls to ob_end_clean(), ob_end_flush() and ob_get_flush() are permitted.

PHP_OUTPUT_HANDLER_STDFLAGS - Equivalent to

PHP_OUTPUT_HANDLER_CLEANABLE|
PHP_OUTPUT_HANDLER_FLUSHABLE|
PHP_OUTPUT_HANDLER_REMOVABLE

Tegniese besonderhede

Terugkeerwaarde: WAAR oor sukses, ONWAAR oor mislukking
PHP weergawe: 4+

❮ PHP-uitsetbeheerfunksies