Home  >  Article  >  PHP Framework  >  yii2 Chinese garbled code

yii2 Chinese garbled code

王林
王林Original
2020-02-17 11:52:032459browse

yii2 Chinese garbled code

Just configure the following in the database configuration:

Recommended learning: yii framework

<?php

return [
    &#39;class&#39; => &#39;yii\db\Connection&#39;,
    &#39;dsn&#39; => &#39;mysql:host=127.0.0.1; dbname=ohmycto; charset=utf8&#39;,
    &#39;username&#39; => &#39;website&#39;,
    &#39;password&#39; => &#39;mengde1B&#39;,
];

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!

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