Questions about U function generation after enabling subdomain names

Source: Internet
Author: User
Tags subdomain subdomain name
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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.