php getallheaders使用注意事项
2014-06-18 10:52
281 查看
This function is an alias for apache_request_headers(). Please read the apache_request_headers() documentation for more information on how this function works.
so if you want to use this function in any platform,you should detect if it is exists:
so if you want to use this function in any platform,you should detect if it is exists:
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; } }
相关文章推荐
- PHP中引用&的使用注意事项
- 使用php webservice(SOAP)的注意事项
- 对php cookie技术的再次理解及使用注意事项
- php 中静态变量static 全局常量const的使用注意事项
- PHP中$_FILES的使用及注意事项
- php与mysql使用注意事项
- PHP IN_ARRAY 函数使用注意事项
- PHP中$_FILES的使用及注意事项
- 使用php mongodb扩展时比较需要注意的事项
- 在php中使用ice注意事项
- php使用Smarty的相关注意事项及访问变量的几种方式
- LINUX下PHP使用PDO访问MYSQL的连接设置注意事项
- 在php中使用mysql的like语句的注意事项
- PHP Header使用注意事项
- php使用js保存的json cookie 字符串,然后解析成数组,需要注意的事项
- php使用iconv函数注意事项
- php使用Smarty的相关注意事项及访问变量的几种方式
- Netbeans使用xdebug插件调试PHP程序的一个注意事项
- PHP 中$_FILES的使用及注意事项
- PHP 中$_FILES的使用及注意事项