Home >Backend Development >PHP Tutorial >How to open PDO and PDO_MySQL extension_PHP tutorial
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.