CodeIgniter Common Knowledge Point Summary, CodeIgniter summary _php Tutorial

Source: Internet
Author: User

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-...

  • 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.