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.
精彩评论