Home  >  Article  >  Backend Development  >  关于yii框架的一个有关问题

关于yii框架的一个有关问题

WBOY
WBOYOriginal
2016-06-13 12:52:31859browse

关于yii框架的一个问题
我想纯手工写个注册的代码,用mysql数据库,除了在配置文件main.php中写 
            'db'=>array(
'connectionString' => 'mysql:host=localhost;dbname=bolg',
'emulatePrepare' => true,
'username' => 'root',
'password' => '',
'charset' => 'utf8',
'tablePrefix' => 'tbl_'
   )
还需要写什么吗


------解决方案--------------------
不需要了。
使用时可以 Yii::app()->getDb() 就是model了。
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn