PHP Manual

PHP funkce ob_get_status()

2019-09-11T08:04:03.000Z

Obsah článku

Dostupnost ve verzích: PHP 4.2.0

Get status of output buffers

Parametry

Parametr Datový typ Výchozí hodnota Poznámka
$full_status bool null true to return all active output buffer levels. If false or not set, only the top level output buffer is returned.

array

If called without the full_status parameter
or with full_status = false a simple array
with the following elements is returned:
2
[type] => 0
[status] => 0
[name] => URL-Rewriter
[del] => 1
)
]]>
Simple ob_get_status results
KeyValue
levelOutput nesting level
typePHP_OUTPUT_HANDLER_INTERNAL (0) or PHP_OUTPUT_HANDLER_USER (1)
statusOne of PHP_OUTPUT_HANDLER_START (0), PHP_OUTPUT_HANDLER_CONT (1) or PHP_OUTPUT_HANDLER_END (2)
nameName of active output handler or ' default output handler' if none is set
delErase-flag as set by ob_start

If called with full_status = true an array with one element for each active output buffer level is returned. The output level is used as key of the top level array and each array element itself is another array holding status information on one active output level. Array ( [chunk_size] => 0 [size] => 40960 [block_size] => 10240 [type] => 1 [status] => 0 [name] => default output handler [del] => 1 ) [1] => Array ( [chunk_size] => 0 [size] => 40960 [block_size] => 10240 [type] => 0 [buffer_size] => 0 [status] => 0 [name] => URL-Rewriter [del] => 1 ) ) ]]>


The full output contains these additional elements:
Full ob_get_status results
KeyValue
chunk_sizeChunk size as set by ob_start
size…
blocksize…

Další zdroje

Oficiální dokumentace funkce ob-get-status

Jan Barášek   Více o autorovi

Autor článku pracuje jako seniorní vývojář a software architekt v Praze. Navrhuje a spravuje velké webové aplikace, které znáte a používáte. Od roku 2009 nabral bohaté zkušenosti, které tímto webem předává dál.

Rád vám pomůžu:

Související články

1.
157.

Potřebujete poradit s PHP?

Nabízím trénink vývojářů, konzultace, školení a analýzu návrhových vzorů. Osobně v Praze nebo online.

Napište mi, pokud si nevíte rady.

Lektor: Jan Barášek

V jiných jazycích

Status:
All systems normal.
2025