The defect solution of thinkphp development Framework operation method

Source: Internet
Author: User
Keywords Development framework thinkphp operating methods
Tags aliyun behavior configuration configuration parameters configure configured development development framework

Remember the previous mention of the solution of the TP operation method, now 3.1 version of a simpler solution, only need to configure the next Action_suffix configuration parameters, obviously more than the way to expand the behavior is much simpler, such as:

' Action_suffix ' => ' http://www.aliyun.com/zixun/aggregation/16339.html ' >action '

That is, support to the operation method to define the suffix, if the above parameters are configured, we actually call the operation of the operation name plus the action suffix, assuming that we currently visit the URL address is:

Http://localhost/index.php/User/list

Access is the user module list operation, in the absence of configuration action_suffix, because the list method is a PHP built-in method will have conflicts, now configured, the actual access should be the Useraction controller Listaction method:

Class Useraction extends action{public Function listaction () {//action method specific Code}}

Of course, you can configure any string as the operation method suffix, action_suffix configuration parameters do not affect the use of the current operation name, the A and R method calls also have no effect.

Related Article

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.