How to use headers list in PHP

In this article I am going to explain about headers_list function in PHP.
  • 1846

PHP headers_list() Function

The http headers_list function returns a list of response headers sent (or ready to sent ) to client.

Syntax of headers_list function

headers_list()

Example of http headers_list  function

<?php

setcookie('abc', 'xyz');

header("MCN_Solution: abc");

header('Content-type: text/plain');

var_dump(headers_list());

?>


Output:

header-list-php.jpg

You may also want to read these related articles :
here

Ask Your Question 

Got a programming related question? You may want to post your question here

Programming Answers here

Categories

More Articles

© 2020 DotNetHeaven. All rights reserved.