Home > Article > PHP Framework > yii2 Chinese garbled code
Just configure the following in the database configuration:
Recommended learning: yii framework
<?php return [ 'class' => 'yii\db\Connection', 'dsn' => 'mysql:host=127.0.0.1; dbname=ohmycto; charset=utf8', 'username' => 'website', 'password' => 'mengde1B', ];
More programming related To learn the content, please visit the Programming Tutorial column of the PHP Chinese website!
The above is the detailed content of yii2 Chinese garbled code. For more information, please follow other related articles on the PHP Chinese website!