php查看HTTP请求头信息代码

1
2
3
4
5
6
7
8
9
10
11
12
<?php
foreach ($_SERVER as $key => $value) {
if ('REQUEST_' == substr($key, 0, 8)) {
echo substr($key,8).'<b>:</b> '.$value;
echo '<br>';
}
if ('HTTP_' == substr($key, 0, 5)) {
echo substr($key, 5).'<b>:</b> '.$value;
echo '<br>';
}
}
?>
0%