|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-08-23 18:59 UTC] iliaa@php.net
[2004-08-23 19:59 UTC] ca533512 at tiscali dot cz
[2004-08-24 06:38 UTC] tony2001@php.net
[2005-01-09 19:04 UTC] tiagojcb at hotmail dot com
[2005-02-15 11:43 UTC] rd dot contact at free dot fr
[2005-03-06 20:58 UTC] sniper@php.net
[2005-05-20 22:20 UTC] alisencer at gmail dot com
[2005-05-20 23:21 UTC] tony2001@php.net
[2005-06-20 14:53 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 20:00:01 2025 UTC |
Description: ------------ If I try code from PHP docs of headers_list() function, browser print only empty array. or this function is not available on win OS ? Reproduce code: --------------- /* setcookie() will add a response header on its own */ setcookie('foo', 'bar'); /* Define a custom response header This will be ignored by most clients */ header("X-Sample-Test: foo"); /* Specify plain text content in our response */ header('Content-type: text/plain'); /* What headers are going to be sent? */ var_dump(headers_list()); Expected result: ---------------- array(4) { [0]=> string(29) "X-Powered-By: PHP/5.0.0" // ... 5.0.1 [1]=> string(19) "Set-Cookie: foo=bar" [2]=> string(18) "X-Sample-Test: foo" [3]=> string(24) "Content-type: text/plain" } Actual result: -------------- array(0) { }