如何使用PHP有效移除HTTP响应头?
- 内容介绍
- 文章标签
- 相关推荐
本文共计374个文字,预计阅读时间需要2分钟。
在PHP中,可以使用`header_remove`函数清除HTTP头。语法是`header_remove([string $name]) : void`。这表示在之前使用`header()`设置的HTTP头将被清除。在Windows 7系统、PHP 7.1版本、DELL G3电脑上,清除HTTP头的方法如下:
phpheader_remove(); // 清除所有之前设置的HTTP头
在php中可以通过header_remove函数清除http头,其语法是“header_remove ([ string $name ] ) : void”,表示删除之前用header()设置的HTTP头。
本文操作环境:windows7系统、PHP7.1版,DELL G3电脑
php怎么清除http头?
header_remove
(PHP 5 >= 5.3.0, PHP 7)
header_remove — 删除之前设置的 HTTP 头
说明
header_remove ([ string $name ] ) : void
删除之前用 header() 设置的 HTTP 头。
参数
name
要移除的头名称。
Note: 参数不分大小写。
返回值
没有返回值。
本文共计374个文字,预计阅读时间需要2分钟。
在PHP中,可以使用`header_remove`函数清除HTTP头。语法是`header_remove([string $name]) : void`。这表示在之前使用`header()`设置的HTTP头将被清除。在Windows 7系统、PHP 7.1版本、DELL G3电脑上,清除HTTP头的方法如下:
phpheader_remove(); // 清除所有之前设置的HTTP头
在php中可以通过header_remove函数清除http头,其语法是“header_remove ([ string $name ] ) : void”,表示删除之前用header()设置的HTTP头。
本文操作环境:windows7系统、PHP7.1版,DELL G3电脑
php怎么清除http头?
header_remove
(PHP 5 >= 5.3.0, PHP 7)
header_remove — 删除之前设置的 HTTP 头
说明
header_remove ([ string $name ] ) : void
删除之前用 header() 设置的 HTTP 头。
参数
name
要移除的头名称。
Note: 参数不分大小写。
返回值
没有返回值。

