作者:Aerotic | 来源:互联网 | 2018-07-15 15:56
我们经常会遇到用手机和电脑打开网站的时候,发现打开的页面是不同的,那么这种方法是怎么做到的呢?我们用php代码教给大家。
php判定手机电脑访问自动跳转头文件代码如下:
0)
return true;
else
return false;
}
if(is_mobile_request()){
header("location:app/index.html");
exit();
}
else{
header("location:index/index.html");
exit();
}
?>
以上就是php判定手机电脑访问自动跳转头文件的代码,有需要的小伙伴们,可以根据实际需要修改即可。