- <?php
- header("content-type:text/html; charset=utf-8");
- echo '<br />'.$_SERVER['HTTP_ACCEPT_LANGUAGE'].'<br />';
- if(strrpos(strtolower($_SERVER['HTTP_ACCEPT_LANGUAGE'],'zh-cn')!==false)){
- echo '<br />中文操作系统<br />';
- }else{
- echo '<br />非中文操作系统';
- }
- //该片段来自于http://www.codesnippet.cn/detail/030920135576.html
来源: http://www.codesnippet.cn/detail/030920135576.html