Home  >  Article  >  Backend Development  >  What is PDO in php

What is PDO in php

(*-*)浩
(*-*)浩Original
2019-10-09 11:25:573689browse

The PHP Data Objects (PDO) extension defines a lightweight, consistent interface for PHP to access databases.

What is PDO in php

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn