标签:nginx turn each substr ret return name exist http
if (!function_exists(‘getallheaders‘)) {
function getallheaders()
{
foreach ($_SERVER as $name => $value) {
if (substr($name, 0, 5) == ‘HTTP_‘) {
$headers[str_replace(‘ ‘, ‘-‘, ucwords(strtolower(str_replace(‘_‘, ‘ ‘, substr($name, 5)))))] = $value;
}
}
return $headers;
}
}
标签:nginx turn each substr ret return name exist http
原文地址:https://www.cnblogs.com/chenkg/p/10299910.html