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
精彩评论