日期:2014-05-16  浏览次数:20377 次

thinkphp3 数据库配置

在生产的Config/config.php配置

<?php
return array(
	//'配置项'=>'配置值'
	'DB_HOST'               => 'localhost', // 服务器地址
    'DB_NAME'               => 'test',          // 数据库名
    'DB_USER'               => 'root',      // 用户名
    'DB_PWD'                => '',          // 密码
    'DB_PORT'               => '',        // 端口
    'DB_PREFIX'             => 'think_',    // 数据库表前缀
	'DB_CHARSET'            => 'utf8',
);
?>

?