魔众网盘系统如何修改系统连接 MySQL 的数据库编码?

魔众网盘系统 / 文档中心
文档中心
开发教程
安装常见问题

修改配置文件 config/database.php

<?php
return [
    // ...
    'connections' => [
        // ...
        'mysql' => [
            // ...
            'charset' => 'utf8mb4',
            'collation' => 'utf8mb4_unicode_ci',
            // ...
        ],
        //  ...
    ],
    // ...
];

修改为 UTF8

  • charset 修改为 utf8
  • collation 修改为 utf8_unicode_ci

修改为 UTF8MB4

  • charset 修改为 utf8mb4
  • collation 修改为 utf8mb4_unicode_ci
QQ
微信
公众号