PHP 8.3.4 Released!

mb_http_input

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

mb_http_input检测 HTTP 输入字符编码

说明

mb_http_input(?string $type = null): array|string|false

检测 HTTP 输入字符的编码。

参数

type

设置的字符串指定了输入类型。 "G" 是 GET,"P" 是 POST,"C" 是 COOKIE,"S" 是 string,"L" 是 list,以及 "I" 是整个列表(将会返回 array)。 如果省略了 type,它将返回最后处理的一种输入类型。

返回值

每个 type 的字符编码名称,如果 type"I" 时为字符编码名称数组。 如果 mb_http_input() 没有处理过任何指定的 HTTP 输入,它将返回 false

更新日志

版本 说明
8.0.0 type 现在可为 null。

参见

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top