PHP 8.4.2 Released!

嵌套输出缓冲区

如果在启动新的缓冲区时已经存在一个活跃的输出缓冲区,那么新的缓冲区将会嵌套在先前活跃的缓冲区内。无论是否嵌套,内部缓冲区的行为都将保持一致,外部缓冲区不会再次缓冲内部的缓冲输出。只有当内部缓冲区冲刷的输出才会被外部缓冲区缓冲。

Most ob_* functions only work with the active output buffer (the last one started) therefore only the active buffer can be flushed, cleaned and turned off. The functions that work with other buffers are ob_list_handlers() which returns the list of all output handlers in use and ob_get_status() which can return information on the active buffer only or on all buffers in use.

Calling ob_get_level() or ob_get_status() will return the nesting level of the active output buffer.

警告

The value for identical levels between ob_get_level() and ob_get_status() is off by one. For ob_get_level() the first level is 1, whereas for ob_get_status() the first level is 0.

添加备注

用户贡献的备注

此页面尚无用户贡献的备注。
To Top