The example in this article describes the method of php getting the header information sent to the user. Share it with everyone for your reference. The specific analysis is as follows:
The headers_list function has no parameters and returns an array. The returned array contains a numerical index table containing the header information to be sent to the client
<?php header("Expires: Sat, 12 Dec 1989 05:30:00 GMT"); echo "This is some output.<br />"; echo "Headers sent are:<br /> <UL>"; $headers = headers_list(); foreach($headers as $header) { echo "<LI>$header</LI>"; } echo "</UL>"; ?>
I hope this article will be helpful to everyone’s PHP programming design.