In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces the method of phpcms to do mobile-side website, which has a certain reference value, friends who need can refer to it. I hope you will learn a lot after reading this article. Next, let the editor take you to learn about it.
It is convenient for PHPCMS to build a website on PC, but it is not very practical in wap mobile phone, and the built-in mobile station does not feel very good, and the template is not easy to control, so modify it now.
First of all, write a custom function to judge mobile phone access in phpcms/libs/functions/extention.func.php.
Then create a folder in the phpcms/templates/default template folder to store the templates of the mobile station.
Create a folder called mobile
And then modify
Phpcms/templates/modules/content/index.php file
Trouble points, judge when loading templates on channel page, list page, and content page, respectively.
For example:
If (check_wap ()) {include template ('mobile', $template);} else {include template (' content', $template);}
In this way, the template in the mobile folder will be loaded when accessed by the mobile phone, and the name of the template in the mobile folder should be the same as that on the PC.
Of course, there will be problems when generating static pages, and the current solution is to use the mobile phone dynamically.
You can do this when invoking data
1 Thank you for reading this article carefully. I hope it will be helpful for everyone to share the content of phpcms as a mobile website. At the same time, I also hope that you will support us, pay attention to the industry information channel, and find out if you encounter problems. Detailed solutions are waiting for you to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.