缓冲区中允许的操作

The operations allowed on buffers can be controlled by passing one of the buffer control flags to ob_start()'s third flags parameter. If omitted, all operations are allowed by default. If 0 is used instead, the buffer cannot be flushed, cleaned or removed but it's contents can still be retrieved.

PHP_OUTPUT_HANDLER_CLEANABLE allows ob_clean() to clean the contents of the buffer.

警告

The absence of the PHP_OUTPUT_HANDLER_CLEANABLE flag will not prevent ob_end_clean() or ob_get_clean() from clearing the contents of the buffer.

PHP_OUTPUT_HANDLER_FLUSHABLE allows ob_flush() to flush the contents of the buffer.

警告

The absence of the PHP_OUTPUT_HANDLER_FLUSHABLE flag will not prevent ob_end_flush() or ob_get_flush() from flushing the contents of the buffer.

PHP_OUTPUT_HANDLER_REMOVABLE allows ob_end_clean(), ob_end_flush(), ob_get_clean() or ob_get_flush() to turn off the buffer.

PHP_OUTPUT_HANDLER_STDFLAGS, the combination of the three flags will allow each of the three operations to be performed on the buffer.

添加备注

用户贡献的备注

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