CI中的重要配置文件

一、application/config/development/config.php

$config['base_url'] = 'http://127.0.0.1/piaoliuxia_admin_v2/';
$config['index_page'] = '';
$config['url_suffix'] = 'html';

二、数据库配置

新建development目录  database.php

$active_group = 'default';
$db['default'] = array(
    'dsn'  => '',
    'hostname' => 'localhost',
    'username' => 'root',
    'password' => 'root',
    'database' => 'loan_market_dev',
    'dbdriver' => 'mysqli',
    'dbprefix' => '',
    'pconnect' => FALSE,
    'db_debug' => (ENVIRONMENT !== 'production'),
    'cache_on' => FALSE,
    'cachedir' => '',
    'char_set' => 'utf8',
    'dbcollat' => 'utf8_general_ci',
    'swap_pre' => '',
    'encrypt' => FALSE,
    'compress' => FALSE,
    'stricton' => FALSE,
    'failover' => array(),
    'save_queries' => TRUE
);

三、自动加载config->autoload.php

$autoload['libraries'] = array('database', 'session');

四、默认控制器config->routes.php

$route['default_controller'] = 'welcome';

五、php配置文件php.ini

D:\WAMP\Apache24\www\piaoliuxia_admin_v2\system\libraries\Session\drivers\Session_files_driver.php

session.save_path = "D:/WAMP/php/tmp"

猜你喜欢

转载自blog.csdn.net/hrbsfdxzhq01/article/details/85680399