Home >Backend Development >PHP Tutorial >javascript - tp framework. Develop website. There are PC version and mobile version. How to automatically identify the visitor's device and then enter different versions.
TP framework develops websites with PC version and mobile version. How to automatically identify the visitor’s device and then enter different versions
There seems to be a very short Baidu code in my image that can achieve it, but now I can’t find it anymore. Please tell me the simplest method
TP framework develops websites with PC version and mobile version. How to automatically identify the visitor’s device and then enter different versions
There seems to be a very short Baidu code in my image that can achieve it, but now I can’t find it anymore. Please tell me the simplest method
<code>navigator.userAgent.match(/AppleWebKit.*Mobile.*/) </code>
<code>composer require mobiledetect/mobiledetectlib</code>
https://github.com/serbanghit...
Same answer useragent
mobile detect
is available on
You can also consider adaptive css framework like bootstrap