config.php 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. <?php
  2. defined('BASEPATH') OR exit('No direct script access allowed');
  3. $config['base_url'] = 'http://'.$_SERVER['HTTP_HOST'].'/'; //CodeIgniter根URL
  4. $config['index_page'] = ''; //默认的索引文件 index.php
  5. $config['uri_protocol'] = 'REQUEST_URI'; //RUL链接 PATH_INFO
  6. $config['url_suffix'] = '.html'; //设置所有URL后缀
  7. $config['language'] = 'english';//使用的语言
  8. $config['charset'] = 'UTF-8';
  9. $config['enable_hooks'] = FALSE;//是否启用钩子功能
  10. $config['subclass_prefix'] = 'Lin_';//扩展类的前缀
  11. $config['composer_autoload'] = FALSE; //自动加载Composer
  12. $config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-\='; //允许的链接字符
  13. $config['allow_get_array'] = TRUE; //是否启用$_GET array
  14. /*
  15. |--------------------------------------------------------------------------
  16. |设置查询的字符串
  17. |--------------------------------------------------------------------------
  18. |
  19. */
  20. $config['enable_query_strings'] = FALSE;
  21. $config['controller_trigger'] = 'c';
  22. $config['function_trigger'] = 'm';
  23. $config['directory_trigger'] = 'd';
  24. /*
  25. |--------------------------------------------------------------------------
  26. | 错误记录
  27. |--------------------------------------------------------------------------
  28. | 0 = 禁用
  29. | 1 = 错误信息(包括PHP错误)
  30. | 2 = 调试消息
  31. | 3 = 信息消息
  32. | 4 = 所有的消息
  33. */
  34. $config['log_threshold'] = 1;
  35. $config['log_path'] = FCPATH.'data/log/'; //记录日志的路径
  36. $config['log_file_extension'] = '';//日志的扩展名,空为.php
  37. $config['log_file_permissions'] = 0644;//日志的权限
  38. $config['log_date_format'] = 'Y-m-d H:i:s';//日志日期名称格式
  39. $config['error_views_path'] = 'data/errors/'; //提示错误的路径
  40. $config['cache_path'] = ''; //缓存目录路径
  41. $config['cache_query_string'] = FALSE;//是否启用缓存
  42. $config['encryption_key'] = 'Kay89757SC';//设置加密密匙
  43. /*
  44. |--------------------------------------------------------------------------
  45. | Session
  46. |--------------------------------------------------------------------------
  47. */
  48. $config['sess_driver'] = 'files'; //使用于 files, database, redis, memcached
  49. $config['sess_cookie_name'] = 'star_session'; //名称
  50. $config['sess_expiration'] = 8640000; //时间
  51. $config['sess_save_path'] = FCPATH.'/tmp/'; //保存路径 只可绝对路径
  52. $config['sess_match_ip'] = FALSE; //是否匹配IP判断
  53. $config['sess_time_to_update'] = 8660000; //多久后生成新的ID
  54. $config['sess_regenerate_destroy'] = TRUE; //是否删除旧ID
  55. /*
  56. |--------------------------------------------------------------------------
  57. | Cookie
  58. |--------------------------------------------------------------------------
  59. */
  60. $config['cookie_prefix'] = '_STAR'; //设置Cookie前缀
  61. $config['cookie_domain'] = ''; //设置范围
  62. $config['cookie_path'] = '/';
  63. $config['cookie_secure'] = FALSE; //只在HTTPS里存在
  64. $config['cookie_httponly'] = FALSE;//只可以通过HTTP里存在
  65. $config['standardize_newlines'] = FALSE;//是否规范换行,不推荐使用
  66. $config['global_xss_filtering'] = FALSE; //XSS过滤,不推荐使用
  67. /*
  68. |--------------------------------------------------------------------------
  69. | 跨站请求伪造
  70. |--------------------------------------------------------------------------
  71. */
  72. $config['csrf_protection'] = FALSE; //是否开启
  73. $config['csrf_token_name'] = 'csrf_test_name'; //令牌名称
  74. $config['csrf_cookie_name'] = 'csrf_cookie_name'; //cookie名称
  75. $config['csrf_expire'] = 7200; //令牌过期时间
  76. $config['csrf_regenerate'] = TRUE; //每次重新生成令牌
  77. $config['csrf_exclude_uris'] = array();//忽略CSRF检查的URI数组
  78. $config['compress_output'] = FALSE;//启用输出Gzip压缩
  79. $config['time_reference'] = 'local';//时间时区
  80. $config['rewrite_short_tags'] = FALSE; //重写PHP短标签
  81. $config['proxy_ips'] = ''; //反向代理IP