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

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

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-13 12:52:31
Original
924 people have browsed it

关于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了。
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template