Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the basic configurations of CodeIgniter

2025-04-10 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article mainly explains "what is the basic configuration of CodeIgniter". The content of the explanation is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn what the basic configuration of CodeIgniter is.

$config ['base_url'] = "https://www.jb51.net/". The URL of your website, according to which CodeIgniter will generate links, form addresses, etc.

$config ['index_page'] = the name of the index.php file under the root directory of "index.php" CodeIgniter, which CodeIgniter uses to generate the link address. If you use a URL that hides index.php, set it to an empty string: $config ['index_page'] = "".

$config ['uri_protocol'] = "AUTO" CodeIgniter generates the format used by URL, which is set to "AUTO" automatic detection. If the link does not work properly, try the following values: PATH_INFO, QUERY_STRING, REQUEST_URI, ORIG_PATH_INFO.

$config ['url_suffix'] = "". The URL suffix that CodeIgniter uses when generating links. If you want to achieve pseudo-static, you can set $config ['url_suffix'] = ".html".

$config ['language'] = "english". The language used by default for CodeIgniter programs

$config ['charset'] = "UTF-8". The character set used by CodeIgniter programs by default

$config ['enable_hooks'] = FALSE. Whether the hook is enabled or not, the hook function allows you to change or add the core running functions of the system without modifying the core files of the system.

$config ['subclass_prefix'] =' MY_'. Sets the class name prefix used when extending the CodeIgniter class library

$config ['permitted_uri_chars'] =' a murz 0-9 percent. Rod _\ -'. Sets the characters allowed in CodeIgniter URL, which is a regular expression. Visitors get a warning when the CodeIgniter URL they are trying to access contains other characters. You should try to limit the characters used by CodeIgniter URL to improve security and effectively filter injection attacks. If set to empty, all characters are allowed, and it is strongly recommended not to do so.

$config ['enable_query_strings'] = FALSE. CodeIgniter URL defaults to segmented URL, which also allows CodeIgniter to turn on URL in the form of a query string. You can use query strings to pass the controllers and functions you want to access. For example: index.php?c=controller&m=method. CodeIgniter uses segmented URL by default, and many of the URL features of query strings are not supported.

$config ['controller_trigger'] =' c'. CodeIgniter uses the value of this option in the query string as the name of the CodeIgniter controller.

$config ['function_trigger'] =' m'. CodeIgniter uses the value of 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 are logged.

0 = turn off error logging

1 = record error message

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 logging directory configuration (system/logs/), you can set up the full server directory.

$config ['log_date_format'] =' Y-m-d Hrigi rives'. 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 the full server directory

$config ['encryption_key'] = "". Key used by CodeIgniter

$config ['global_xss_filtering'] = FALSE. Whether to automatically filter cross-script attacks on input data (GET, POST)

$config ['compress_output'] = FALSE. Enable Gzip compression to achieve the fastest page loading 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 support it, CodeIgniter can support this by overriding short tags.

$config ['proxy_ips'] = "". If visitors access your site through a proxy server, you must set up a proxy server IP list to identify the visitor's real IP.

Thank you for your reading, the above is the content of "what is the basic configuration of CodeIgniter". After the study of this article, I believe you have a deeper understanding of what the basic configuration of CodeIgniter has, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report