Home > Article > Backend Development > Using PDO MySQL extension in php
Open PDO MySQL extension under PHP
The PDO extension defines a lightweight, consistent method for PHP to access the database interface, which provides a data access abstraction layer so that queries and data can be retrieved through a consistent version of functions, regardless of the database used.
Open PDO and PDO_MySQL extension
Method:
1. Find the php.ini file
2. After opening it, search for extension=php_pdo.dll and extension=php_pdo_mysql.dll, 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.
Recommended tutorial: "PHP Video Tutorial"
The above is the detailed content of Using PDO MySQL extension in php. For more information, please follow other related articles on the PHP Chinese website!