1. Before the operation, we need to make a backup of the site database first.
Next we add the template group of the mobile station. Click "Templates",
Select the Import/export template Group in Template group management, select the default template group, and then export the exported file to save it first. Then change the template group name to "Computer Access template group". Then upload the file you just exported from the Import template group on the right, and two template groups appear. We can then rename the default template group to "Phone access template group".
-
Next, the site's D directory is backed up, as this folder typically holds pictures of the article pages.
Create a new directory in the root directory of your site as a place to store your mobile station. Then set up the domain name resolution, such as m.xxxx.com, the method of domain name resolution here is not introduced, if you do not understand Baidu can be a bit.
Then upload the Imperial CMS Program installation package and install a new platform. Note the installed table prefix requires only a temporary setting of a name. Because after installation, two platforms will call the same database.
-
At this point, we need to modify the mobile site config.php this file, will implement two platforms simultaneously call a database, and modify the template group call ID.
- Open config.php file with Emedit
- Change the database name and user name to the same database as the computer side.
- Default template group ID changed to the template group ID 3 that we have set for mobile access
Modify the cookie scope to prevent logging in at the same time in two background when only one problem is logged.
Next, we go to the mobile website background to modify the relevant parameters.
After clicking on "template", you will find that the option in the upper left corner has become "new phone template group", the next step is to modify the relevant template page.
To make a phone template, it is important to add these lines to the Meta section.
<meta name= "format-detection" content= "Telephone=no" >
<meta name= "apple-mobile-web-app-capable" content= "yes" >
<meta content= "Width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;" name= "viewport" >
The rest is exactly the same as the computer station we made.
Because the computer access and mobile Access database is shared, there is no need to change the background of the phone station. You only need to add a regular update on each page. We add articles on the computer side and update the information periodically to ensure synchronization.
Make a mobile website (Empire CMS chapter)