开发者

what's the php way of setting the lang of a document?

Recently I've learned that setting the charset using the meta tag is a pretty sub-standard way of doing things since we should instead set the charset in the server side like this:

header( 'Content-type: text/html; charset=utf-8' );

Does this concept also applies to the lang attribute of the html tag?

If so, what's开发者_高级运维 the php way of setting the lang attribute of a document?


Try the Content-Language header.


Same as the regular HTML way: no difference for php. <html lang="en"> remains the way forward.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜