Home > CMS Tutorial > PHPCMS > Where is the phpcms controller?

Where is the phpcms controller?

藏色散人
Release: 2020-01-03 10:33:53
Original
2794 people have browsed it

Where is the phpcms controller?

Where is the phpcms controller?

If you are familiar with PHP development, this is actually very simple, just like rewriting general PHP class methods. Next, I will talk about your questions that I understand based on the characteristics of phpcm, and see if I can help you.

phpcms is an MVC architecture pattern based on functional modules. There is a modules directory under the system root directory phpcms. This directory stores all modules of phpcms, such as our commonly used content modules (content), membership modules (member), background modules (admin), etc.

So, if you want to modify a certain function method under that module, just 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, if I want to extend this method, first the content module, then enter the content directory, and then according to the routing rules (m=content&c=index&a=show represents the content module The show method in the index file) find the show method in the file name index where the corresponding controller is located, and then just write whatever you want to develop in it. You can also redefine the method name to be executed by modifying the a parameter value in the routing rule.

Okay, because the question you asked is relatively general, let’s stop here first. If you have any questions, you can ask. You can also refer to the official development manual of phpcms and the secondary development tutorial of iphpcms.

PHP Chinese website, a large number of free PHPCMS tutorials, welcome to learn online!

The above is the detailed content of Where is the phpcms controller?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template