CodeIgniter Common Knowledge Point Summary, CodeIgniter Summary
This paper briefly summarizes the common knowledge points in the development of CodeIgniter. Share to everyone for your reference, as follows:
Jump:
$this->load->helper (' url '); redirect ();
Constant definition:
config/constants.php
About language files:
Just say my own way. To unify the management of error messages decide to do a error_lang.php
Create a new folder under Application/language Chinese new file error_lang.php
In the config.php:
$config [' language '] = "中文版";
Modified to:
$config [' language '] = "Chinese";
If necessary, you can automatically load the error in the autoload.php.
$autoload [' language '] = Array (' ERROR ');
error_lang.php File Contents
<?php$lang[' error_user_login ' = "username or password is wrong | Please check your input and re-login"; >
When using, use the following statement
$this->lang->load (' error '); $this->lang->line (' Error_user_login ');
Let CodeIgniter support $_get
Solution:
1) in config.php, set ' Uri_protocol ' to ' path_info '.
$config [' uri_protocol '] = "path_info";
2) before you need to use $_get, add:
Parse_str ($_server [' query_string '], $_get);
In this way, the shape as index.php/blog/list?parm=hello&page=52 can be run.
More interested in CodeIgniter related content readers can view this site topic: "CodeIgniter Introductory Tutorial", "CI (codeigniter) Framework Advanced Tutorial", "PHP Excellent Development Framework Summary", "thinkphp Getting Started", " Summary of common methods of thinkphp, "Introduction to Zend Framework Frame", "Introduction to PHP Object-oriented Programming", "Introduction to Php+mysql Database Operation" and "PHP common database Operation Skills Summary"
It is hoped that this article is helpful to the PHP program design based on CodeIgniter framework.
http://www.bkjia.com/PHPjc/1133077.html www.bkjia.com true http://www.bkjia.com/PHPjc/1133077.html techarticle CodeIgniter Common Knowledge Point Summary, CodeIgniter Summary This paper briefly summarizes the common knowledge points in CodeIgniter development. Share to everyone for your reference, as follows: Jump: $this-...