php 获取客户端操作系统语言
获取客户端操作系统语言 [代码片段(9行)]
<?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://outofmemory.cn
- 上一篇:扩展名 php从给定的url获取文件扩展名
- 下一篇:php 缩略图类
精彩图集
精彩文章






