Provides various official and user-released code examples and code reference. You are welcome to exchange your learning errors:
1. After sub-domain grouping is enabled, the U function address does not generate group names, no matter which domain name
2. Some groups do not generate groups without subdomain names.
3. Some subdomain names are also configured with the module name, but the module name will still be generated
Solution:
1. You can determine whether to generate a subdomain name address. If the subdomain name is generated, the group, module, and method are generated based on the subdomain name configuration.
2. If you do not generate a subdomain name, you still need to have the group name, Module name, and so on.
The following is my solution to modify the U function.
Add code in the U function and modify it. I don't know where to put it. qq757534524
/* Enable the subdomain name, automatically delete the module corresponding to the subdomain name, and generate the Group */
If (C ('app _ SUB_DOMAIN_DEPLOY ')){
Foreach (C ('app _ SUB_DOMAIN_RULES ') as $ key => $ val ){
$ GROUP = substr ($ val [0], 0, strpos ($ val [0], '/');
$ MODULE = substr ($ val [0], strpos ($ val [0], '/') + 1 );
If (isset ($ var [C ('var _ group')]) and $ VAR [C ('var _ group')] ==$ GROUP ){
Unset ($ var [C ('var _ group')]);
}
If (isset ($ var [C ('var _ module')]) and $ VAR [C ('var _ module')] = $ MODULE ){
Unset ($ var [C ('var _ module')]);
}
}
}
AD: truly free, domain name + VM + enterprise mailbox = 0 RMB