Home  >  Article  >  Backend Development  >  How to get the header information sent to the user in php, phpheader_PHP tutorial

How to get the header information sent to the user in php, phpheader_PHP tutorial

WBOY
WBOYOriginal
2016-07-13 10:03:30856browse

How php gets the header information sent to the user, phpheader

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

<&#63;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>";
&#63;>

I hope this article will be helpful to everyone’s PHP programming design.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/968262.htmlTechArticleHow to get the header information sent to the user by php, phpheader This article describes the example of php getting the header information sent to the user. method. Share it with everyone for your reference. The specific analysis is as follows...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn