Home > PHP Framework > YII > body text

Solution to garbled yii2 page

Release: 2019-12-07 11:02:01
Original
2827 people have browsed it

Solution to garbled yii2 page

Yii2 page garbled solution:

Just configure the encoding format in the database configuration:

<?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;,
];
Copy after login

Recommended: yii usage tutorial

The above is the detailed content of Solution to garbled yii2 page. For more information, please follow other related articles on the PHP Chinese website!

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