(PHP 5, PHP 7)
headers_list — �����ѷ��͵� HTTP ��Ӧͷ���������͵ģ�
headers_list() �᷵�������������/�ͻ��˵� HTTP ͷ�б� �����Щͷ�Ƿ��Ѿ����ͣ�ʹ�� headers_sent()��
��������������ͷ���顣
Example #1 ʹ�� headers_list() ������
<?php
/* setcookie() ���Լ����һ����Ӧͷ */
setcookie('foo', 'bar');
/* ����Զ������Ӧͷ
������ͻ��˻��������� */
header("X-Sample-Test: foo");
/* ��Ӧ��ָ������Ϊ���� text */
header('Content-type: text/plain');
/* ���Իᷢ��ʲôͷ�أ� */
var_dump(headers_list());
?>
�������̻������
array(4) {
[0]=>
string(23) "X-Powered-By: PHP/5.1.3"
[1]=>
string(19) "Set-Cookie: foo=bar"
[2]=>
string(18) "X-Sample-Test: foo"
[3]=>
string(24) "Content-type: text/plain"
}
Note:
����ͷֻ����SAPI֧��ʱ�õ�����������