CodeIgniter common knowledge point summary, codeigniter _ PHP Tutorial

Source: Internet
Author: User
Tags constant definition
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.

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.