PHP TP NULL operation NULL Controller

Source: Internet
Author: User

__ Double underline beginning, collectively known as Magic Method

Empty Operation method
1. Do the Empty method (write method in subclass)
function _empty ()
{
echo "page does not exist, please check the browser address information";
}
2. Make Default template (bad, controllability poor)

NULL controller
Do the empty controller, write the empty method inside

Cross-controller invocation
1. Method of making objects
$index =new Indexcontroller ();//Case sensitive here
echo $index->shuchu ();
2. Using a method to create an object method (Quick Method)
$index = A ("controller name");
3. Use the R method to create an object and invoke a specific action method
R ("Method name in the Controller object name/object");

Cross-module invocation
1.A method
$index = A ("Module name/Controller name")
2.R method
R ("Module name/Build Controller object name/method name inside Object");

PHP TP NULL operation NULL Controller

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.