Home > Backend Development > PHP Tutorial > phaclon框架怎么在配置文件设置字符集

phaclon框架怎么在配置文件设置字符集

WBOY
Release: 2016-06-23 14:20:36
Original
857 people have browsed it

phaclon框架怎么在配置文件设置字符集


回复讨论(解决方案)

可以吗?需要自己编码控制吧
phaclon\db 可以支持多种数据库,而每种数据库设置字符集的方法都不一样

已经找到了,在设置db注入容器的时候可以设置,
            "options" => array(
            PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES GBK",
            PDO::ATTR_CASE => PDO::CASE_LOWER
    )

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