首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > PHP >

PHP判断是不是包含某个汉字

2013-01-19 
PHP判断是否包含某个汉字$urlhttp://www.youdao.com/smartresult-xml/search.s?typeip&q$xmlfile_g

PHP判断是否包含某个汉字
$url='http://www.youdao.com/smartresult-xml/search.s?type=ip&q=';
$xml=file_get_contents($url.$ip);
$data=simplexml_load_string($xml);
$country=$data->product->location;   //获取国家
if($country==mb_strpos($Word_DB, "日本", 0, 'gbk'))
{
Header("Location:http://www.hao123.com");
}
else
{
echo "sorry,but the country that you live in have not permission to view this page.";
}
?>

$country保存了国家名,为什么总是判断不出来呢?
[解决办法]
http://www.youdao.com/smartresult-xml/search.s?type=ip&q=
只看到这个
?xml version="1.0" encoding="gbk"?>
<smartresult/>

热点排行