Blogger Information
Blog 7
fans 0
comment 0
visits 8113
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
1. PDO连接数据库的过程与参数设置
dongfeng的博客
Original
1151 people have browsed it

pdo的环境

在windows环境下,在php.ini在中加载 extension=php_pdo.dll  对mysql 加载extension=php_pdo_mysql.dll;

链接数据库就是创建pdo对象

__construct()

$dbms='mysql';

$dbName='Db_aaa';

$usr='root';

$passWord='root';

$host='localhost';

$pdo= new pdo($dsn,$usr,$password);

$dsn="$dbms:host=$host;dbname=$dbName";


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