PDO (PHP Data Object), a database access abstraction layer, unifies the various database access interfaces.
PDO features: Encoding consistency, flexibility, high performance, object-oriented features.
PDO is simply an abstract interface layer, which cannot operate the database itself.
One, PDO installation and configuration
1. Configure the PHP configuration file to open the appropriate extension extension = Php_pdo.dll
2. Open the response database extension extension = Php_pdo_mysql.dll
3. You can see the details of the PDO extension by viewing the Phpinfo
Second, PDO connection database
1. Connect the database as a parameter "recommendations"
????
???? $DSN the data source to which you want to connect the database. If the connection succeeds, the database object object is returned.
2. Connecting to a database by URI
????
3. Connect to the database as a configuration file "not recommended"
Database Abstraction Layer PDO