Home >Backend Development >PHP Tutorial >How to open PDO and PDO_MySQL extension_PHP tutorial

How to open PDO and PDO_MySQL extension_PHP tutorial

WBOY
WBOYOriginal
2016-07-13 10:23:481202browse

How to enable PDO and PDO_MySQL extension in PHP

The PDO extension defines a lightweight, consistent interface for PHP to access the database, which provides a data access abstraction layer , so that no matter what database is used, queries and data can be retrieved through consistent functions.

In some PHP management systems, you need to enable PDO and PDO_MySQL extensions. The method is very simple:

1. Find the php.ini file

2. After opening, search for extension=php_pdo.dll and extension=php_pdo_mysql.dll, and remove the previous ";" comment.

The final configuration content of these two lines is as follows:

extension=php_pdo.dll

extension=php_pdo_mysql.dll

After restarting apache or iis, check whether it is enabled in the phpinfo function.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/834965.htmlTechArticleHow PHP enables PDO and PDO_MySQL extension PDO extension defines a lightweight, consistent method for PHP to access the database interface, which provides a data access abstraction layer so that regardless of use...
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