header() 与<meta>的区别

header(); 

https标头是服务器以HTTP协议传送HTML信息到浏览器前所送出的字串。 


因为meta标签是属于html信息的,所以header()发送的内容先到达浏览器,通俗点就是header()的优先级高于meta(不知道可 不可以这样讲)。

header("content-type:text/html;charset=xxx");用于起作用

<meta http-equiv="content-type" content=""text/html;charset=xxx>不一定起作用,因为apache有默认的header()设定

原文地址:https://www.cnblogs.com/feng12345/p/5481293.html