phpday 2027 - Call for Papers

zlib_get_coding_type

(PHP 4 >= 4.3.2, PHP 5, PHP 7, PHP 8)

zlib_get_coding_type — Returns the coding type used for output compression

说明

function zlib_get_coding_type(): string|false

Returns the coding type used for output compression. It is chosen from the Accept-Encoding request header: when zlib.output_compression is enabled (at request start or with ini_set()), or the first time ob_gzhandler() runs.

参数

此函数没有参数。

返回值

Returns "gzip" if the Accept-Encoding request header contains gzip, otherwise "deflate" if it contains deflate. Returns false if no coding type has been chosen yet, for instance because output compression is not enabled or the header contains neither.

参见

+添加备注

用户贡献的备注

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