最近我了解到使用meta标签设置字符集是一种非常不合标准的处理事情的方式,因为我们应该在服务器端设置字符集,像这样:
header( 'Content-type: text/html; charset=utf-8' );
这个概念是否也适用于html标签的lang属性?
如果是,php如何设置文档的lang属性?
试试Content-Language头
与常规HTML方式相同,对php没有区别。<html lang="en">
仍然是前进的方向。
最近我了解到使用meta标签设置字符集是一种非常不合标准的处理事情的方式,因为我们应该在服务器端设置字符集,像这样:
header( 'Content-type: text/html; charset=utf-8' );
这个概念是否也适用于html标签的lang属性?
如果是,php如何设置文档的lang属性?
试试Content-Language头
与常规HTML方式相同,对php没有区别。<html lang="en">
仍然是前进的方向。