thinkPHP3.2 page URL What do I do without a module name?
Http://localhost/think_message/index.php/Index/index/p/2.html This is the default
Http://localhost/think_message/index.php/Home/Index/index/p/2.html This is the right thing, the Home module is missing.
Reply to discussion (solution)
Generate URLs using the U method
Can you do something specific, please?
There is no module name, because the current module is the default module, so your URL is not a problem:
' default_module ' = ' Home ',//default module ' module_deny_list ' = = Array (' Common ', ' User '),//block access Module ' Module_allow_list ' = = Array (' Home ', ' Admin '),//Allow access to the module
Your question is not when the template generated the URL, there is no module name? If so, you can use the constant module_name to get:
{: U (module_name. ' Controller name/Method name ')}
Under the stupid, can you elaborate on where to set the module_name? I use TP to bring the page, manual paging This column does not set the URL
It should be that you are using the TP3.1 page class (tp3.1 unless it is a group, otherwise there is no home level, and tp3.2 always has a home level)
You should go to the TP website to see if there is a new page class
If you really want to digest yourself, then you should modify the page so that he adapts to the tp3.2 change.
I use the version is thinkPHP3.2.3, the level is really very dishes, the manual does not see the URL settings
$show = Str_replace ("index.php/index/", "index.php/home/index/", $show, $index);
It's settled, thank you.