开发者

PHP getallheaders alternative

I am trying to switch from apache to nginx on my server. The only problem here is the getallheaders() function I used in my PHP scripts which does not work with Nginx. I have tried the user contributed notes on php site on getallheaders finction 开发者_如何学Gobut that does not return all request headers.

Please tell me how to solve this problem. I would really like to switch to Nginx.


You can still use it but you will have to re-define/re-write it like here

http://www.php.net/manual/en/function.getallheaders.php#84262


A request header of Owner-ID will be passed to php as $_SERVER['HTTP_OWNER_ID'] by nginx. All request headers are passed in a similar manner.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜