apache 如何添加header头信息呢?
这个可以在 .htaccess 中 进行添加。 但是是有条件的,Apache必须开启了 mod_headers.so 这个模块。

apache_request_headers() 可以获取apache header头中的值
以下是设置了 头信息 查看
<?php
header('Access-Control-Allow-Origin:*');
header('Access-Control-Allow-Credentials: true');
header('Access-Control-Allow-Methods:GET,PUT,POST,DELETE,OPTIONS');
header('Access-Control-Allow-Headers:WWW-Authenticate,Authorization,Set-Cookie,X-Requested-With, Accept, Accept-Version, Content-Length, Content-MD5, Content-Type, Date, X-Api-Version');
//获取头部信息end
$header = apache_request_headers();
//取head标签内容
var_Dump($header);exit;
?>