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 - uitsetbeheerfunksies


PHP-uitsetbeheerfunksies

PHP bied 'n stel funksies wat beheer watter inhoud na die blaaier gestuur word en wanneer. Dit word na verwys as uitsetbeheer .

Uitset kan van enige van die volgende bronne kom:

  • echo, print, printf, print_r... en ander soortgelyke funksies en stellings
  • Kennisgewings, waarskuwings en foute van PHP
  • Enige inhoud buite die <?php ?>etikette

PHP en die agterkant waarop dit loop, kan die uitvoer in 'n buffer hou voordat dit aan die gebruiker gestuur word.

Let wel: Die uitsetbeheerfunksies kan enige aantal uitsetbuffers skep. Uitsetbuffers vang uitset wat deur die program gegee word. Elke nuwe uitsetbuffer word bo-op 'n stapel uitsetbuffers geplaas, en enige uitset wat dit verskaf, sal deur die buffer daaronder opgevang word. Die uitsetbeheerfunksies hanteer slegs die boonste buffer, dus moet die boonste buffer verwyder word om die buffers daaronder te beheer.

Installasie

Die PHP-uitsetbeheerfunksies is deel van die PHP-kern. Geen installasie is nodig om hierdie funksies te gebruik nie.


Runtime-konfigurasie

Die gedrag van uitsetbeheerfunksies word beïnvloed deur instellings in php.ini:

Name Default Description Version
output_buffering "0" Enables output buffering for all PHP files by default 4
output_handler NULL Set the name of the default function which handles the output of all output buffers 4
implicit_flush "0" Enables implicit flush, which causes output to be sent directly to the browser on each output statement 4
url_rewriter.tags "a=href,area=href, frame=src,form=,fieldset=" Indicates which HTML tags and attributes can be modified by the URL rewriter (the output_add_rewrite_var() function.) 4.3
url_rewriter.hosts The current value of $_SERVER['HTTP_HOST'] URL rewriting is only done on the server's own URLs by default. To allow for rewriting URLs of other websites, set the hostnames of the other websites here. 7.1

PHP-uitsetbeheerfunksies

Method Function
flush() Attempts to send content from the system's output buffer to the browser
ob_clean() Deletes all of the content from the topmost output buffer
ob_end_clean() Deletes the topmost output buffer and all of its contents
ob_end_flush() Deletes the topmost output buffer and outputs its contents
ob_flush() Outputs the contents of the topmost output buffer and clears the buffer
ob_get_clean() Returns all of the contents of the topmost output buffer and clears the buffer
ob_get_contents() Returns the contents of the topmost output buffer
ob_get_flush() Outputs and returns the contents of the topmost output buffer and then deletes the buffer
ob_get_length() Returns the number of bytes of data that are in the topmost output buffer
ob_get_level() Returns a number indicating how many output buffers are on the stack
ob_get_status() Returns information about the output buffers
ob_gzhandler() Used as a callback function for ob_start() to compress the contents of the buffer when sending it to the browser
ob_implicit_flush() Turns implicit flushing on or off
ob_list_handlers() Returns an array of callback function names that are being used by the topmost output buffer
ob_start() Creates a new output buffer and adds it to the top of the stack
output_add_rewrite_var() Used to append query string parameters to any URL in the output
output_reset_rewrite_vars() Removes all variables added by output_add_rewrite_var()