How to access the public action class after the thinkphp module Group

Source: Internet
Author: User
How can I access the public action class after the thinkphp module is grouped: ask a question: how can I access the public action class after the thinkphp module is grouped? & Nbsp; for example, if a project is divided into two groups: Aa and Bb, there are two folders under the Action, so how to access the Action class under the public Action (that is, the class directly written in the Action directory? How to access the public action class after the thinkphp module is grouped
Master: how can I access the public action class after the thinkphp module is grouped? For example, if a project is divided into two groups: Aa and Bb, and there are two folders under the Action, how can I access the Action under the public Action (that is, the class directly written in the Action directory) class?


------ Solution --------------------
Common classes are usually placed in the Common folder.
------ Solution --------------------
Put it in common
------ Solution --------------------
Just inherit the public class. I did this.
PublicAction inherits Action
Then inherit PublicAction from the two groups in the directory.
------ Solution --------------------
I have never tried it. can I directly access it? You can set the default group. in this case, you can save the group column. you can also use routing rules to direct requests accessing the action directory to php in another group.
I don't think so.
------ Solution --------------------
When you create an application, there will be a common folder where public files are stored.

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.