A summary of common knowledge points of CodeIgniter and a summary of codeigniter. CodeIgniter common knowledge point summary, codeigniter summary this article briefly summarizes common knowledge points in CodeIgniter development. For your reference, refer to: $ this-CodeIgniter common knowledge points and codeigniter summary.
This article briefly summarizes common knowledge points in CodeIgniter development. We will share this with you for your reference. The details are as follows:
Jump:
$this->load->helper('url');redirect();
Constant definition:
Config/constants. php
About Language files:
I just decided to make an error_lang.php policy for unified error information management.
Create a folder named "chinese" in application/language and create the file "error_lang.php ".
In config. php:
$config['language'] = "english";
Modify:
$config['language'] = "chinese";
If necessary, you can automatically load the error in autoload. php.
$autoload['language'] = array('error');
Error_lang.php file content
<? Php $ lang ['error _ user_login '] = "the user name or password is incorrect. | check your input and log on again.";?>
Use the following statement
$this->lang->load('error');$this->lang->line('error_user_login');
Enable CodeIgniter to support $ _ GET
Solution:
1) in config. php, set 'uri _ protocol' to 'path _ info '.
$config [ 'uri_protocol' ] = "PATH_INFO" ;
2) before using $ _ GET, add:
parse_str ( $_SERVER [ 'QUERY_STRING' ] , $_GET ) ;
This is like index. php/blog/list? Parm = hello & page = 52.