首页 > 代码库 > 博客系统-3.0CodeIgniter系统SAE版本的配置 application/config/

博客系统-3.0CodeIgniter系统SAE版本的配置 application/config/

  1. autoload.php(系统启动时自动加载的文件:包,类库,驱动,方法助手,配置)
    1. $autoload[‘libraries‘] = array(‘database‘, ‘access‘, ‘pagination‘);//类库:数据库/权限类/分页类
    2. $autoload[‘drivers‘] = array(‘session‘);//驱动:session
    3. $autoload[‘helper‘] = array(‘url‘, ‘file‘, ‘cookie‘, ‘form‘, ‘array‘);//方法:url,文件,cookie,表单,数组
    4. $autoload[‘config‘] = array(‘app‘);//配置:项目
  2. config.php 项目公共配置
    1. $config[‘enable_hooks‘] = TRUE;//使用钩子
    2. $config[‘log_threshold‘] = 0;//日志记录级别
    3. $config[‘log_path‘] = ‘‘;//日志路径
    4. $config[‘cache_path‘] = ‘‘;//缓存路径
    5. $config[‘encryption_key‘] = ‘blog_;//session加密
    6. $config[‘sess_expiration‘]        = 3600;//session过期时间
    7. $config[‘sae_output_cache‘] = ‘kvdb‘;//输出类页面缓存配置
  3. constants.php 静态变量
    1. define(‘PAGE_LIMIT‘, 10);//每页条数
  4. database.php SAE数据库
    $active_group = ‘default‘;$query_builder = TRUE;$db[‘default‘] = array(    ‘dsn‘    => ‘‘,    ‘hostname‘ => SAE_MYSQL_HOST_M,    ‘hostname‘ => SAE_MYSQL_HOST_S,    ‘username‘ => SAE_MYSQL_USER,    ‘password‘ => SAE_MYSQL_PASS,    ‘database‘ => SAE_MYSQL_DB,    ‘port‘ => SAE_MYSQL_PORT,    ‘dbdriver‘ => ‘mysqli‘,    ‘dbprefix‘ => ‘‘,    ‘pconnect‘ => FALSE,    ‘db_debug‘ => TRUE,    ‘cache_on‘ => FALSE,    ‘cachedir‘ => ‘‘,    ‘char_set‘ => ‘utf8‘,    ‘dbcollat‘ => ‘utf8_general_ci‘,    ‘swap_pre‘ => ‘‘,    ‘autoinit‘ => TRUE,    ‘encrypt‘ => FALSE,    ‘compress‘ => FALSE,    ‘stricton‘ => FALSE,    ‘failover‘ => array(),    ‘save_queries‘ => TRUE);
  5. hooks.php 验证访问权限 $hook[‘pre_system‘]=。。。;
  6. routes.php 默认路由
    $route[‘default_controller‘] = ‘site‘;$route[‘404_override‘] = ‘‘;$route[‘translate_uri_dashes‘] = FALSE;

博客系统-3.0CodeIgniter系统SAE版本的配置 application/config/