* Fix error for php5.3.

This commit is contained in:
zhaoke
2023-02-09 09:14:17 +00:00
parent db114d1c39
commit 55c9922a49
+15
View File
@@ -998,3 +998,18 @@ if(!function_exists('array_column'))
return $output;
}
}
if (!function_exists('getallheaders')) {
function getallheaders()
{
$headers = array();
foreach ($_SERVER as $name => $value)
{
if (substr($name, 0, 5) == 'HTTP_')
{
$headers[str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))))] = $value;
}
}
return $headers;
}
}