开发者

get_browser not showing ismobiledevice

开发者 https://www.devze.com 2023-01-22 12:40 出处:网络
I\'m using the ismobiledevice value in the array that get_browser() returns to redirect users to the mobile version of开发者_如何学Go a page. However, when I access the page from an iPhone, the ismobi

I'm using the ismobiledevice value in the array that get_browser() returns to redirect users to the mobile version of开发者_如何学Go a page. However, when I access the page from an iPhone, the ismobiledevice value doesn't come back as 1. What could be the cause and how can I fix it?


Maybe your browscap.ini doesn't contain the descriptions of iPhones/iPads.
Get a recent browscap.ini from e.g. http://browsers.garykeith.com/downloads.asp

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号