Analysis on automatic loading of classes in CI framework _ php instance

Source: Internet
Author: User
This article mainly introduces the automatic loading of classes in the CI framework, and analyzes the automatic loading function and specific operation skills of classes in the CI framework based on the instance form, for more information about the automatic loading of classes in the CI framework, see the example in this article. We will share this with you for your reference. The details are as follows:

Application/config

Add the following in the configuration file:

| 1. Packages
| 2. Libraries
| 3. Helper files
| 4. Custom config files
| 5. Language files
| 6. Models

1. third-party library file loading

// $autoload['packages'] = array(APPPATH.'third_party', '/usr/local/shared');$autoload['packages'] = array();

2. system library loading

// $autoload['libraries'] = array('database', 'session', 'xmlrpc');$autoload['libraries'] = array('database','session','form_validation','pagination','upload','curl','user_agent');

3. Help File loading

// $autoload['helper'] = array('url', 'file');$autoload['helper'] = array('url','cookie','form','captcha','string','html','array','date','file','common');

4. configure File loading

// $autoload['config'] = array('config1', 'config2');$autoload['config'] = array();

5. language file loading

// $autoload['language'] = array('lang1', 'lang2');$autoload['language'] = array();

6. Automatic loading of data models

//$autoload['model'] = array('model1', 'model2');$autoload['model'] = array('');

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.