tp3.2 模块单独配置数据库

Posted 奔跑的小猪

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了tp3.2 模块单独配置数据库相关的知识,希望对你有一定的参考价值。

一 $User = M(\'test\',\'tp_\',\'mysql://root:123456@localhost/new_lezhu#utf8\');

  1.test        -->表名

  2.tp_         -->表前缀

  3.mysql       -->数据库类型

  4.root        -->用户

  5.123456     -->密码

  6.localhost   -->服务器ip

  7new_lezhu -->数据库名字

二 $User = M(\'test\',\'tp_\',\'MY_SQL\'); 

   1.test     -->表名

      2.tp_      -->表前缀

      3.MY_SQL    -->数据库配置

以上是关于tp3.2 模块单独配置数据库的主要内容,如果未能解决你的问题,请参考以下文章