So I study how to use PHP to determine whether the Web is a computer access or mobile phone access, and then to load different CSS to achieve the phone and the computer can be normal access to the effect.
Web site looked up a lot of information, and finally found a suitable, more useful code, but also hope to give you
To determine whether a website is accessed by a mobile user or a PC user, we only need to obtain the user's HTTP_USER_AGENT. I first introduced a general Mobile_Detect, the following two examples are self-written and hope to help you. php... to determine whether a website is accessed by a mobile user or a PC user, we only need to obtain the user's HTTP_USER_AGENT. I first introduced a general Mobile_Detect,
Let's take a look at a simple js check for mobile phone access to carry out the mobile website code. I hope the article will be helpful to you. Here we just make a comprehensive judgment.
The Code is as follows:
Copy code
If (/AppleWebKit. * Mobile/I. test (navigator. userAgent) | (/MIDP | Symbi
So I studied how to use PHP to determine whether the Web page is computer access or mobile access, and then by loading different CSS to achieve the phone and the computer can be normal access to the effect.
Web site looked at a lot of information, and finally found a suitable, more useful code, but also hope to give y
Mobile Game channel SDK access tool project sharing (2) Everything starts hard, mobile game sdk
After receiving the task, programmers usually start to conduct technical research, but I am the project owner. There are a lot of things to be prepared in advance, and no one can help.
I. Manpower Configuration
A wave of people have been involved for more than half a y
function Mobile_device_detect (URL) {varThisos =Navigator.platform; varOS =NewArray ("IPhone","IPod","IPad","Android","Nokia","SymbianOS","Symbian","Windows Phone","Phone","Linux armv71","MAUI","untrusted/1.0","Windows CE","BlackBerry","Iemobile"); for(vari =0; i ) { if(Thisos.match (Os[i])) {window.location=URL; } } //because quite a part of the cell phone system does not know the information, here is to do temporary special identification if(Navigator.platform.indexOf ('IPad')
Nowadays, there are more and more people using mobile phones to access the internet. Therefore, mobile phone users bring a considerable amount of traffic to the website. However, websites that are only suitable for PC-end websites and want to access the website through mobile
Pain PointIn doing a mobile End H5 page, the phone to debug access, inconvenient. Just want to say can the mobile phone connected to the computer's PHP project, debugging and modification.NeedMobile phone with the computer in the same local area network, the company is generally local area network, there is no words to spend a 20 dollars to buy a portable wifi. I
This article mainly introduces the code for automatically redirecting from a pc website to a mobile website through two mobile phones. For more information, see 4G, the official pc and mobile websites coexist. How can someone else access your pc-side official website and directly jump to a
Nowadays, there are more and more people using mobile phones to access the internet. Therefore, mobile phone users bring a considerable amount of traffic to the website. However, websites that are only suitable for PC-end websites and want to access the website through mobile
Method one, through the mobile phone QQ Delete
1. If you log in to QQ directly in the "mobile phone QQ", click to open "dynamic" into, as shown
2. After entering "friend dynamic" we see as shown in the figure
3. In the dynamic click on "Today's visitors" open access, as shown in the following figure.
4. Here you can see the space
What technology is now used to identify PC access or mobile Access?
What technology is now used to identify PC access or mobile Access? Title
WAP
Mobile Phone
Share to:
more
Through http_user_agent to determine whether the user is from the mobile phone access, or computer IE access.
ASP code Snippets: The main use of the regular matching mobile phone environment, we can add mobile platform.
Copy Code code as follows:
Set regex = ne
This is the previous search on the Internet JS method, it is not clear where to find, you can automatically jump to the mobile version of the page.Mobile Access website automatically jump to mobile version
So I studied how to use php to determine whether the webpage is accessed by a computer or by a mobile phone, and then load different css to achieve normal access on both the mobile phone and computer.
I found a lot of information on the website and finally found a suitable and useful code. I hope I can give you a reference.Copy codeThe Code is as follows:
Functio
Navigator ObjectCheck the user-agent value of the client sending server. Determine if the source of the mobile end.function Gopage () { if (Navigator.userAgent.match (/(phone|pad|pod|iphone|ipod|ios|ipad| android| mobile| blackberry| iemobile| mqqbrowser| juc| fennec|wosbrowser| Browserng| webos| symbian| (Windows phone)/i)){ Window.location.href= "Your mobile
First of all, recommend a PHP lightweight identification class, mobile-detect specifically to identify whether the phone or PC-side access to the site, which can be based on the terminal type of access to the mobile browser to adapt to the Web site or PC Browser Web site.
Mobile
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.