<?php$headers = php_sapi_name() === 'cli' ? xdebug_get_headers() : headers_list();?> up down 22 Anonymous ¶ 11 years ago note that it does not return the status...
header('Content-type: text/plain'); /* What headers are going to be sent? */ var_dump(headers_list()); ?> 以上例程会输出: array(4) { [0]=> string(23) "X-Powered-B...
headers_list (PHP 5, PHP 7)headers_list — Returns a list of response headers sent (or ready to send) Description array headers_list ( vo PHP官方教程,w3cschool。