CodeIgniter Basic Configuration Detailed Introduction _php skill

Source: Internet
Author: User
Tags php server set time codeigniter
$config [' base_url '] = "http://www.jb51.net/". The Web site of your website, CodeIgniter will be based on this site to generate links, form addresses and so on.
$config [' index_page '] = index.php file name CodeIgniter The root of index.php, which CodeIgniter uses to generate a link address. If you use a hidden index.php URL, set it to an empty string: $config [' index_page '] = '.
$config [' uri_protocol '] = "Auto" CodeIgniter the format used to generate the URL, set to auto probe for "auto". If the link does not work correctly, you can try the following values: Path_info, Query_string, Request_uri, Orig_path_info.
$config [' url_suffix '] = "". CodeIgniter the URL suffix used when generating the link, and if you want to implement pseudo static, you can set $config [' url_suffix '] = ". html".
$config [' language '] = "中文版". language that the CodeIgniter program uses by default
$config [' charset '] = "UTF-8". Character set used by the CodeIgniter program by default
$config [' enable_hooks '] = FALSE. If hooks are enabled, the hook function allows you to change or increase the core functioning of the system without modifying the system core files.
$config [' subclass_prefix '] = ' my_ '. Set the class name prefix to use when extending the CodeIgniter class library
$config [' permitted_uri_chars '] = ' A-Z 0-9~%.:_\-'. Sets the characters that are allowed in the CodeIgniter URL, which is a regular expression. A warning is received when a visitor attempts to access a CodeIgniter URL that contains other characters. You should try to limit the characters used by CodeIgniter URLs to improve security and effectively filter the injection attacks. If set to NULL, allow all characters to be used, it is strongly recommended that you do not do so.
$config [' enable_query_strings '] = FALSE. The CodeIgniter URL uses a segmented URL by default, and this option also allows CodeIgniter to open the query string as a URL. You can use query strings to pass the controllers and functions that you want to access. For example: Index.php?c=controller&m=method. CodeIgniter a segmented URL is used by default, and many features of the query string are not supported.
$config [' controller_trigger '] = ' C '. CodeIgniter The value of this option in the query string as the name of the CodeIgniter controller.
$config [' function_trigger '] = ' m '. CodeIgniter the value corresponding to this option in the query string as the name of the CodeIgniter controller method
$config [' log_threshold '] = 0. Enable error logging to set which types of errors to log.
0 = Turn off error logging
1 = Log error message
2 = logging Debug information
3 = Log Notification information
4 = record All information
$config [' log_path '] = "". If you do not want to use the default error logging directory configuration (system/logs/), you can set up a full 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 up a full server directory
$config [' encryption_key '] = "". Keys used by CodeIgniter
$config [' global_xss_filtering '] = FALSE. Whether the input data (get, POST) is automatically filtered for cross script attacks
$config [' compress_output '] = FALSE. Enable gzip compression to achieve the fastest page load speed
$config [' time_reference '] = ' local '. Set time format: "Local", "GMT"
$config [' rewrite_short_tags '] = FALSE. If you want to use short tags, but the PHP server does not, CodeIgniter can support this feature by overriding short tags.
$config [' proxy_ips '] = "". If visitors visit your Web site through a proxy server, you must set up a proxy IP list to identify the true IP of the visitor.

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.