Blogger Information
Blog 15
fans 0
comment 0
visits 12680
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
pdo 的基础
峰回掠影的博客
Original
723 people have browsed it

 new  pdo()   new 创建一个类 

第一个参数:字符串,拼装方法

pdo连接之后返回对象

pdo是直接连接数据库

$dsn = ‘mysql  127.0.0.1 ; dbname = 用户名; charset = utf8;Prot=3306’;

$dbname = ‘root’;

$dbpw = ‘root’;

 new  pdo($dsn,$dbname,$dbpw);



Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post