Introduction to the basic configuration file config. php of the CodeIgniter framework. The basic configuration information of CodeIgniter is in the applicationconfigconfig. php file. This article describes each basic configuration option in detail to quickly master CodeIgniter for development. $ Config [bas CodeIgniter basic configuration information is in the application/config. php file. This article describes each basic configuration option in detail to quickly master CodeIgniter for development.
$ Config ['base _ url'] = "http://www.bkjia.com /". The URL of your website. CodeIgniter generates links and form addresses based on the URL.
$ Config ['index _ page'] = "index. php": name of the index. php file under the CodeIgniter root directory. CodeIgniter uses this file to generate a link address. If you use the URL to hide index. php, set it to an empty string: $ config ['index _ page'] = "".
$ Config ['uri _ protocol'] = "AUTO" CodeIgniter: format used to generate the URL. set it to "AUTO" for automatic detection. If the link does not work properly, try the following values: PATH_INFO, QUERY_STRING, REQUEST_URI, and ORIG_PATH_INFO.
$ Config ['url _ suffix '] = "". The URL suffix used by CodeIgniter to generate a link. to implement pseudo-static state, you can set $ config ['url _ suffix '] = ". html ".
$ Config ['language'] = "english ". Default CodeIgniter language
$ Config ['charset'] = "UTF-8 ". Default character set used by the CodeIgniter program
$ Config ['enable _ Hooks'] = FALSE. Whether to enable the hook function. The Hook function allows you to change or add the core running function of the system without modifying the core file of the system.
$ Config ['subclass _ prefix'] = 'My _'. Set the class name prefix used to extend the CodeIgniter class library
$ Config ['permitted _ uri_chars'] = 'A-z 0-9 ~ % .:_\-'. Set the characters allowed in the CodeIgniter URL. this is a regular expression. When a visitor attempts to access a CodeIgniter URL that contains other characters, a warning is given. We recommend that you restrict the characters used by CodeIgniter URLs to improve security and effectively filter injection attacks. If it is set to Null, all characters are allowed. we strongly recommend that you do not do this.
$ Config ['enable _ query_strings '] = FALSE. CodeIgniter URLs use segmented URLs by default. This option also allows CodeIgniter to enable string-based URL query. You can use query strings to pass the controllers and functions to be accessed. For example, index. php? C = controller & m = method. CodeIgniter uses segmented URLs by default. many features of string URL query are not supported.
$ Config ['Controller _ trigger'] = 'C '. CodeIgniter treats the value corresponding to this option in the query string as the name of the CodeIgniter controller.
$ Config ['function _ trigger'] = 'M '. CodeIgniter treats the value corresponding to this option in the query string as the name of the CodeIgniter controller method.
$ Config ['log _ threshold '] = 0. Enable error logs and set the types of errors to be recorded.
- 0 = disable error logging
- 1 = record error information
- 2 = record debugging information
- 3 = record notification information
- 4 = record all information
$ Config ['log _ path'] = "". If you do not want to use the default error log Directory configuration (system/logs/), you can set the complete server directory.
$ Config ['log _ date_format'] = 'Y-m-d H: I: s '. CodeIgniter error log time format
$ Config ['cache _ path'] = "". If you do not want to use the default cache Directory (system/cache/) to store the cache, you can set the complete server directory
$ Config ['encryption _ key'] = "". Key used by CodeIgniter
$ Config ['global _ xss_filtering '] = FALSE. Whether to automatically filter cross-script attacks against input data (GET and POST)
$ Config ['compress _ output'] = FALSE. Enable Gzip compression to achieve the fastest page loading speed
$ Config ['time _ reference '] = 'local '. Set the time format: "local", "GMT"
$ Config ['rewrite _ short_tags'] = FALSE. If you want to use the short tag, but not supported by the PHP Server, CodeIgniter can rewrite the short tag to support this function.
$ Config ['proxy _ IP'] = "". If a visitor accesses your website through a proxy server, you must set a proxy server IP list to identify the visitor's real IP address.
Http://www.bkjia.com/PHPjc/752328.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/752328.htmlTechArticleCodeIgniter basic configuration information in the application/config. php file, this article describes in detail each basic configuration options, so as to quickly master CodeIgniter development. $ Config ['Bas...