<?php // 带PDO options参数的创建连接 $connection = new \Phalcon\Db\Adapter\Pdo\Mysql(array( "host" => "localhost", "username" => "root", "password" => "sigma", "dbname" => "test_db", "options" => array( PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES \'UTF8\'", PDO::ATTR_CASE => PDO::CASE_LOWER ) ));
官方介绍:http://docs.phalconphp.com/zh/latest/reference/db.html#pdo-setting-up-additional-pdo-options
转载请注明:小Y » phalcon的数据库连接官方版编码设置