Title
The following project directory structure How to configure the mobile Web site to find a Is_mobeli () function to make a judgment on how to configure the big God Guidance
Reply content:
Title
The following project directory structure How to configure the mobile Web site to find a Is_mobeli () function to make a judgment on how to configure the big God Guidance
You mean another module, then the module is the Display WAP page, page entrance according to Is_mobile to judge, you now bind_moudle an app
Judge in the place of the entrance document. It is better to separate the mobile phone controller and so on, of course, if the mobile phone and PC-side gap is not very large with the same set also line.
When we do this, the PC-side pages are inherited from the base/pcbase.html, pcbase.html the header footer and the like. Then the pcbase.html put JS script to detect whether it is a mobile device, if the mobile device automatically jump to the mobile side.
See you do project size, if the project is not small, you can do a mobilecontoller directly under the home, if the big words, pull a mobilemoudle to do.
We don't use is_mobile, but we use JS script to judge. You like that, you use that.
is thinkphp3.0 the old project?
Then first config.php in the update next to append a mobile group, command you to decide, as follows
'APP_GROUP_LIST' => 'Admin,Home,Member,Mobile'
Then add the mobile directory to the action, add the Mobile directory to the TPL, and continue with the various Controller,model,view development
Finally, if your home group inherits a base class, like
class IndexAction extends BaseAction {
So you add the Is_mobile function to the _initialize function in baseaction so that all controller requests trigger the judgment