views:

44

answers:

2

Is there possible whether there are some header information set so far in PHP?

+4  A: 

Try headers_sent().

PHP docs on headers_sent().

You can also retrieve the headers for a page with get_headers() and list them with headers_list(). I'm a bit confused though, do you mean you want to check if something like header("Location: /path/to/location"); has been called?

Josh K
This is about **sent**, but I'm asking about **set**, a little different,right?
There are a variety of header functions, can you be more specific about what you need to check? Some code maybe?
Josh K
@user what do you mean under "set"?
Col. Shrapnel
+1  A: 

Try using header_list() to determine what headers are ready to be sent to the client. Use headers_sent() to check if all whas sent.

-- Happy coding!

muxare