本帖最后由 痞子哥 于 2019-4-26 16:18 编辑
在网站的公共函数文件里加上这个试试。
- if (!function_exists('getallheaders'))
- {
- function getallheaders()
- {
- $headers = '';
- foreach ($_SERVER as $name => $value)
- {
- if (substr($name, 0, 5) == 'HTTP_')
- {
- $headers[str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))))] = $value;
- }
- }
- return $headers;
- }
- }
复制代码 |