thinkphp M database cannot be switched
ringa_lee
ringa_lee 2017-05-16 12:58:13
0
1
438

In version 3.1 of tp, a database needs to be temporarily switched in the code
$a=M('admin_user')->select();
$b=M_O("compony")->sele ct();
$c=M('xx','cc_','mysql://root:root@111.111.111.111/db')->select;
M_O method is return One is similar to M('xx','cc_','mysql://root:root@111.111.111.111/db'), but $c returns false. It seems that the connection is not sent and is switched to the local one. Is this the case? What's going on

ringa_lee
ringa_lee

ringa_lee

reply all(1)
滿天的星座

Look at the log, are you not connected to the database?

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template