首页> 基础笔记 >PHP基础学习 >PDO PDO

PDO连接设置字符集

作者:小萝卜 2019-09-09 浏览 887

简介PDO连接设置字符集,$pdo->exec(“set names utf8”);或者$pdo->query(“set names utf8”);

PDO连接设置字符集

设置php连接mysql时的客户端字符串和连接字符串集为:
 
$pdo->exec(“set names utf8”);

或者:

$pdo->query(“set names utf8”);

 

 

很赞哦! (0)

文章评论

    高端网站建设