ThinkSAAS數(shù)據(jù)庫連接文件data/config.inc.php是在安裝thinksaas完成后系統(tǒng)自動(dòng)生成的。、
代碼如下:
//數(shù)據(jù)庫配置
$TS_DB['sql']='mysql';//選擇數(shù)據(jù)庫鏈接方式:mysql、pdo_mysql
$TS_DB['host']='localhost'; //數(shù)據(jù)庫服務(wù)器
$TS_DB['port']='3306'; //數(shù)據(jù)庫端口
$TS_DB['user']='root'; //數(shù)據(jù)庫用戶名
$TS_DB['pwd']='123456'; //數(shù)據(jù)庫密碼
$TS_DB['name']='thinksaas'; //所連接的數(shù)據(jù)庫
$TS_DB['pre']='ts_'; //表前綴
define('dbprefix','ts_');