到目前为止,PHP中是否有可能设置一些标题信息?
答案 0 :(得分:7)
尝试headers_sent()
。
headers_sent()上的PHP文档。
您还可以检索包含get_headers()的网页的标头,并将其列为headers_list()。我有点困惑,你的意思是你想检查是否有header("Location: /path/to/location");
这样的东西?
答案 1 :(得分:3)
尝试使用header_list()确定哪些标头可以发送到客户端。 使用headers_sent()检查标头是否已发送到客户端。