如何使用PHP检测移动设备? [英] How do you detect a mobile device with PHP?
本文介绍了如何使用PHP检测移动设备?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在寻找用于检测某人是否正在使用移动设备查看网站的最佳方法/做法.如果检测到移动设备,我希望能够调整网站模板,以便查看.
I'm looking for the best method/practice to use for detecting if a person is using a mobile device to view a website. I'd like to be able to adjust the templates of the website if a mobile device is detected so it's easier to view.
什么是最可靠,最有效的检测移动设备的方法?
What is the most reliable and effective method for detecting mobile devices?
推荐答案
您可以使用此为此目的的项目:
You can use this project to do that:
if ($detect->isMobile()) {
// Any mobile device.
}
这篇关于如何使用PHP检测移动设备?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文