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
Total Preview: 1125
How to connect to the database in YII?
Copyright © 2024. Powered by Intellect Software Ltd