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!