12) CodeIgniter Source code Analysis of the model.php

Source: Internet
Author: User

1<?phpif( !defined(' BasePath '))Exit(' No Direct script access allowed ');2 /**3 * CodeIgniter Model Class4  */5 classCi_model {6 7  /**8 * Constructor9   */Ten  function__construct () One  { ALog_message (' Debug ', "Model Class Initialized")); -  } -  the  /** - * __get - * The Model class code is very few, the useful method is the following one, the following method is to be in the model can be like the controller through the $this-> - * Do a lot of things. For example, in the model to load a library, you can $this->load->library (XXX), in fact, it is a misappropriation controller.  +   */ -  function__get ($key) +  { A   $CI=&get_instance (); at   return $CI-$key; -  } -}

12) CodeIgniter Source code Analysis of the model.php

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.