config.php
<?php
return Array(
//'Configuration Items' = 'Configuration Values'
//Cache
//' data_cache_type ' = ' Memcache ',
//' memcache_host ' = ' tcp://192.168.0.227:11211 ',
//' data_cache_time ' = ' 3600 ',
' Default_controller '=' Index ', // Default controller name
' Default_action '=' index ', // Default action Name
//Database ConfigurationBeruiuser
' DB_CONFIG1 '=Array(
' Db_type '=' MySQL ',
' Db_user '=' Root ',
' Db_pwd '=' aisijkl81 ',
' Db_host '=' 192.168.0.111 ',
' Db_port '=' 3306 ',
' db_name '=' 2222 ',
),//There are cross-library operations inside
//Database ConfigurationBr_esfmanager
' Db_config2 '=Array(
' Db_type '=' MySQL ',
' Db_user '=' Root ',
' Db_pwd '=' aisijkl8*1 ',
' Db_host '=' 1111111 ',
' Db_port '=' 3306 ',
' db_name '=' 444 ',
),//There are cross-library operations inside
' domain '=' demo ',//this should be done after the onlineAPI
Used in the Code
$data =m ()->db (2, "Db_config2")->table ("Mn_r_house_web")->where ($where)->find ();
This article is from the "php/[email protected]" blog, be sure to keep this source http://liang3391.blog.51cto.com/178205/1909253
Configuring links to multiple databases in tp3.2