且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在php中添加http标头网站

更新时间:2022-05-20 05:42:03

Apache MOD_HEADERS,将以下内容添加到根目录.htaccess文件

Apache MOD_HEADERS, add the following to your root .htaccess file

<FilesMatch "\.(php|cgi|pl|htm)$">
    Header set X-UA-Compatible IE=EmulateIE8
</FilesMatch>

这将在所有php,html,perl和cgi文件的http标头中设置该标头,但是我对x-ua标头有过非常糟糕的体验,并发现它并不总是有效。

This will set that header in the http header of all php, html, perl and cgi files, but I have had very bad experiences with the x-ua header, and found that it doesn't always work.