CI Framework source reading: Controller controller.php
The recent time is a little tight, source reading series update some slow. Since the controller in the code is relatively small, this blog first update the source of the file analysis.
After a routed distribution, the actual application controller takes over all the user's requests and is responsible for interacting with the user's data. All application controllers in
Ciajax is the method for detecting whether to use ajax or page post to submit data. Ci checks whether ajax or page post submits data. ciajax examples in this article describe how ci checks ajax or page post submits data. Share it with you for your reference. The specific method for implementing the ci detection is ajax or page post data submission, ciajax
This a
: This article mainly introduces the CI framework learning essay. if you are interested in the PHP Tutorial, you can refer to it. Bytes ---------------------------------------------------------------------------------------
Codeigniter framework
Bytes ---------------------------------------------------------------------------------------
Instructor: Yan Yiliang
Weibo: weibo.com/it266
Bytes -------------------------------------------------------------
model, which is responsible for the business logic, and the encapsulated calling interface can be reused by the controller.The tasks on each level are clear:Model (DAO): The work of the data persistence layer, which is encapsulated in the operation of the database.Service: The business Logic layer, is responsible for the business module logic application design, the controller can invoke the service interface to realize the business logic processing, improves the common business logic reusabili
CI goes to index. the default rewriteurl of phpCI is similar to this. for example, if your CI root directory is under/CodeIgniter/, your second-level url is similar to http: // localhost/CodeIgniter/index. php/welcome. Not very nice. how can I remove index. php from it? CI to index. php
The default rewrite url of CI
The default rewriteurl for CI to go to index. phpCI is similar. for example, your CI root directory is under CodeIgniter, and your second-level url is similar to localhostCodeIgniterindex. phpwelcome. Not very nice. how can I remove index. php from it? 1. open the apache configuration file and remove confht CI to index. php.
The default rewrite url of
CI framework source code interpretation: how to use the Hook. php file to expand functions ,. The CI framework source code is interpreted using the Hook. php file to complete function expansion. This article describes how to use the Hook. php file to interpret the CI framework source code to complete function expansion. I will share with you how to use the Hook.
CI Framework Source Reading Note 8 Controller controller.php,cicontroller.php
The recent time is a little tight, source reading series update some slow. Since the controller in the code is relatively small, this blog first update the source of the file analysis.
After a routed distribution, the actual application controller takes over all the user's requests and is responsible for interacting with the user's data. All application controllers in
CI removes the index.php from the URL
Ci default rewrite URL is similar to this, http://localhost:9090/ci/index.php/news;
This kind of URL is not very good-looking, and also unfriendly, how to remove the index.php it?
1, first determine whether the server is the AP or IIS, here the AP processing methods;
Check to see if the AP supports mod_rewrite, and if not,
Libraries,helpers,hooks folder description for several files in the CI framework
Source: Unknown Time: 2014-10-20 11:37 read: 117 xbdadminReading guidance 1.library folder if you want to extend the functionality of CI, then put your class library here, note that this folder is composed of class, you can see if loading library notes! 2.helper folders If you need to use some functions to help you ...1.librar
process:(1) Let CI be able to load the Service,service directory under Application, because the CI system does not have a Service, then create a new extension under Application/core my_service.phpCopy CodeThe code is as follows:Class My_service{Public Function __construct (){Log_message (' Debug ', ' Service Class Initialized ');}function __get ($key){$CI = Get
This article mainly introduces common Classic operations of the CI framework, and summarizes and analyzes the operations and usage skills of the CI framework, such as URL, route, pseudo-static, paging, session, and verification code, for more information, see the examples in this article. We will share this with you for your reference. The details are as follows:
1. URI in the Super object
Information abou
The default rewriteurl for CI to go to index. phpCI is similar. for example, your CI root directory is under CodeIgniter, and your second-level url is similar to localhostCodeIgniterindex. phpwelcome. Not very nice. how can I remove index. php from it? 1. open the apache configuration file and go to index. php for co CI.
The default rewrite url of
: This article mainly introduces the CI framework development-custom menu. if you are interested in the PHP Tutorial, refer to it. The custom menu function is implemented under the CI framework. a model and a class library are written. the access_token implementation method is included.
Dolist (); return $ this-> setmenu ();} private function dolist () {$ CI
This paper summarizes the common classical operation classes of CI framework. Share to everyone for your reference, as follows:
1. URIs in the Super object
Information about parsing URLs for the Ci_uri class
Using $this->uri directly can use its related properties
In the system/core/uri.php file
Some Common properties:
(1) segment to get URL related information
$this->uri->segment (4);//Gets the value of the fourth segment of pathinfo//in the URL
Ent
This article mainly introduced the CI framework implementation of the framework of the front and back end of the separation method, combined with the case of a more detailed analysis of the CI frame front and rear end of the separation of related views, controller settings and expansion of the operation skills, the need for friends can refer to the next
In this paper, we analyze the method of the
The code to read the news in the CI tutorial cannot run the display error (database.php is already configured)
A PHP Error was encountered
Severity:warning
Message:mysqli::real_connect (): (hy000/1045): Access denied for user ' root ' @ ' localhost ' (using Password:yes)
filename:mysqli/mysqli_driver.php
Line number:202
BackTrace:
file:d:\php\vc14\apache24\htdocs\ci\application\models\news_model.phpLine:5F
The CI framework allows you to add or change the core functions of the system (such as rewriting the cache, output, etc.) without modifying the core code of the system. For example, by adding a specific hook, you can have the system trigger a specific script at a specific moment (config.php $config[' enable_hooks ') = TRUE under the condition of the system opening hook:
$hook [' post_system '] = Array ( ' class ' = ' framelog ', ' function
CI Paging
CI paging class, how to display the number (page, next page, home, last) for the picture display it?
For example, this form
Reply to discussion (solution)
Find text, change to IMG tag
Find text, change to IMG tag
Concrete How to change, please pointing pointing!!!
'; var $cur _tag_close= ' ' var $next _tag_open= '; var $next _tag_close= '; var $prev _tag_open= '; var $prev _tag_close= ';
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.