Question:How to connect to the database in YII?
Answer To connect a database, you have to edit the database .php file which is at yii\protected\config\database.php: <?php 'connectionString' => 'mysql:host=localhost;dbname=yii116', 'emulatePrepare' => true, 'username' => 'root', 'password' => '', 'charset' => 'utf8', );
+ Report
How to connect to the database in YII?