Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to see where the phpcms controller is

Shulou Source: shulou.com Published: 2022-06-02 01:24:30 10月02日 Update

How do I see where the phpcms controller is? This problem may be often seen in our daily study or work. I hope you can gain a lot from this question. The following is the reference content that the editor brings to you, let's take a look at it!

Where is the phpcms controller?

Speaking of which, if you are familiar with php development, it is actually very simple, just like rewriting normal php class methods. Next, I will talk about your questions that I understand according to the characteristics of phpcm, and see if I can help you.

Phpcms is a MVC architecture model based on functional modules. In the system root directory phpcms there is a modules directory, this directory stores all the modules of phpcms, such as our commonly used content module (content), membership module (member), background module (admin) and so on.

So, if you want to modify a functional method under that module, go to the corresponding directory to find the controller (controller), and then do the corresponding secondary development.

I take the common article content page method as an example, for example, I want to extend this method, first of all, the content module, then go to the content directory, then according to the routing rules (m=content&c=index&a=show represents the show method in the index file of the content module), find the show method in the corresponding controller file name index, and then write what you want to develop here. You can also redefine the name of the method to be executed by modifying the a parameter value in the routing rule.

Thank you for reading! After reading the above, do you have a general idea of how to see where the phpcms controller is? I hope the content of the article will be helpful to all of you. If you want to know more about the relevant articles, you are welcome to follow the industry information channel.

Tags: Module content method controller control directory article development function file rule routing problem next representative member function module parameter can be passed through Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno vpn NVidia OPPO Reno Microsoft MySQL