Home  >  Article  >  Backend Development  >  How can a PHP program reasonably structure the PC and mobile websites to automatically switch access?

How can a PHP program reasonably structure the PC and mobile websites to automatically switch access?

WBOY
WBOYOriginal
2016-09-19 09:16:291062browse

The programs are the same set, and the domain name structure is as follows:
PC domain name: www.xxxx.com Mobile domain name: m.xxxx.com
How to reasonably build automatic switching access between PC and mobile phones,
Don’t tell me about my mobile phone Add a function judgment when accessing the terminal,
In addition to different templates, how can the terminal control it more reasonably

Reply content:

The programs are the same, and the domain name structure is as follows:
PC domain name: www.xxxx.com Mobile domain name: m.xxxx.com
How to reasonably build automatic switching access between PC and mobile phones,
Don’t tell me about my mobile phone Add a function judgment when accessing the terminal,
In addition to different templates, how can the terminal control it more reasonably

The server can be exactly the same. . . Just distinguish the front-end template in the function that renders the page

Responsive layout?

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn