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.