开发者

Any way to "follow" PHP headers?

开发者 https://www.devze.com 2022-12-19 17:41 出处:网络
I\'m having a problem where my script is redirecting to a location using header(). However, it\'s a headache to debug this since I have so many functions that send headers. Is there any debug feature

I'm having a problem where my script is redirecting to a location using header(). However, it's a headache to debug this since I have so many functions that send headers. Is there any debug feature in 开发者_如何学CPHP that allows me to follow the headers? Thanks


No, a quick way would be to install APD and replace/hook the header function

take a look at the override_function it would permit to define your own header function with some logging.

a brute force solution would be also to replace all the header( by header2( for example so you can write your own function with some trace.

Warning: don't do this on your production machine because APD have a big performance impact.


You should use a logging framework and you can use headers_list() to get the headers.


try running your webbrowser through paros proxy. You can see any kind of header sent between client and server

0

精彩评论

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

关注公众号