Home >Backend Development >PHP Problem >What is PDO in php
The PHP Data Objects (PDO) extension defines a lightweight, consistent interface for PHP to access databases.
PDO provides a data access abstraction layer, which means that no matter which database is used, The same functions (methods) can be used to query and obtain data.
PDO is released with PHP5.1 and can also be used in the PECL extension of PHP5.0. It cannot run on previous PHP versions. (Recommended learning: PHP video tutorial)
PDO installation
You can check whether the PDO extension is installed through PHP's phpinfo() function .
Installing PDO on Unix systems
On Unix or Linux you need to add the following extension:
extension=pdo.so
Windows users
PDO and all major drivers are distributed with PHP as shared extensions, to activate them simply edit the php.ini file and add the following extension:
extension=php_pdo.dll In addition, there are various database extensions corresponding to the following:
;extension=php_pdo_firebird.dll ;extension=php_pdo_informix.dll ;extension=php_pdo_mssql.dll ;extension=php_pdo_mysql.dll ;extension=php_pdo_oci.dll ;extension=php_pdo_oci8.dll ;extension=php_pdo_odbc.dll ;extension=php_pdo_pgsql.dll ;extension=php_pdo_sqlite.dll
The above is the detailed content of What is PDO in php. For more information, please follow other related articles on the PHP Chinese website!