Codeigniter Features & Structure

Source: Internet
Author: User

Bytes -------------------------------------------------------------------------------------------------

There are many open-source PHP frameworks on the market. codeigniter is one of them, and you have obvious advantages when you select it:

Simple, fast, and thorough MVC, clean URLs, no template engine for efficiency, convenient extension, and excellent documentation.

 

CI design architecture goals: Dynamic instantiation, referencing at least core resources.

Loosely Coupled to reduce component dependencies.

Component uniqueness.

       

CI application process:

  1. Index. php acts as the front-end controller and initializes the basic resources required to run codeigniter.
  2. The router checks the HTTP request to determine who will process the request.
  3. If a cached file exists, it bypasses the normal system execution sequence and is directly sent to the browser.
  4. Security ). Before the application controller is loaded, HTTP requests and data submitted by any user are filtered.
  5. The Controller loads models, core libraries, auxiliary functions, and other resources required to process specific requests.
  6. The final view rendering is sent to the content in the Web browser. If caching is enabled, the view is first cached and can be used for future requests.

 

We recommend that you start from the CI documentation and understand the principles in the documentation more thoroughly:

Http://codeigniter.org.cn/user_guide/index.html

[Email protected] Black Eye poet <www. chenwei. ws> --------------------------------

After one year, the CI will be upgraded to version 2.20 for security updates. After downloading it, extract it to the directory and use it. The structure is as follows:

Application project application directory

System CI core file directory

User_guide CI documentation (delete this document and use the online manual)

Index. php CI framework entry file

 

Enter the project directory application,

The controllers, models, and views directories are the MVC development directories we use,

Core, helpers, and libraries are used to customize the extended core file help function class libraries;

The system first loads the custom extension file of the application. If the file in the system is not loaded, it is easy to manage and expand. This is similar to most PHP frameworks.

 

In the CI route configuration file application/config/routes. php, the default configuration is $ route ['default _ controller'] = 'Welcome ';

Therefore, the application/controller/welcome. php controller is accessed by default from the entry file,

If you change the default controller to home, you can: $ route ['default _ controller'] = 'home ';

Bytes ------------------------------------------------------------------------------------------------

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.