What are the common knowledge points of CodeIgniter
This article will explain in detail what are the common knowledge points about CodeIgniter. The editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.
Jump:
$this- > load- > helper ('url'); redirect ()
Constant definition:
Config/constants.php
About language files:
I only said that I decided to make an error_lang.php in order to unify the management of error messages.
Create a new folder under application/language, chinese, create a new file error_lang.php
In config.php:
$config ['language'] = "english"
Modified to:
$config ['language'] = "chinese"
Error can be loaded automatically in autoload.php if necessary.
$autoload ['language'] = array (' error')
Error_lang.php file content
When in use, 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) add: before you need to use $_ GET:
Parse_str ($_ SERVER ['QUERY_STRING'], $_ GET)
In this way, something like index.php/blog/list?parm=hello&page=52 can be run.
This is the end of this article on "what are the common knowledge points of CodeIgniter?". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.