当前位置:网站首页>How to change php INI file supports PDO abstraction layer
How to change php INI file supports PDO abstraction layer
2022-07-06 10:31:00 【Yisu cloud】
How to change php.ini File support pdo Abstraction layer
This article introduces “ How to change php.ini File support pdo Abstraction layer ” Knowledge about , During the operation of the actual case , Many people will encounter such difficulties , Next, let Xiaobian lead you to learn how to deal with these situations ! I hope you will read carefully , Be able to learn !
Method :1、 Open profile “php.ini”;2、 lookup “pdo_firebird”、“pdo_oci”、“pdo_odbc”、“pdo_pgsql” etc. PDO Related configuration information , Put the semicolon in front of the configuration item “;” Remove ;3、 restart Apache The server that will do .
The operating environment of this tutorial :windows7 System 、PHP7.1 edition 、DELL G3 The computer
PDO What is it?
PDO yes PHP Date Object(PHP Data objects ) For short , It is PHP A lightweight..., defined for accessing a database 、 A consistent interface , It provides a data access abstraction layer , So no matter what database you use , You can query and obtain data through the same function , Greatly simplifies the operation of the database , And can shield the difference between different databases .
PDO Is with the PHP5.1 Version released together , Use PDO It is very convenient to develop cross database programs , And the migration between different databases , at present PDO Supported databases include Firebird、FreeTDS、Interbase、MySQL、SQL Server、ODBC、Oracle、Postgre SQL、SQLite and Sybase etc. .
With PDO You don't have to use it anymore mysqli_* A series of functions , Just use PDO The method in can operate the database .
Turn on PDO
PDO Is with the PHP5.1 Together with , Default included in PHP5.1 in . because PDO need PHP5 Support for core object-oriented features , Therefore, it cannot be PHP5.0 In previous versions .
By default ,PDO stay PHP Medium is on , But to enable support for a database driver , Corresponding configuration operations are still needed .
With Windows Take the system as an example , In profile php.ini In the relevant PDO The relevant configuration information is as follows :
;extension=pdo_firebird ;extension=php_pdo_mysql.dll ;extension=pdo_oci ;extension=pdo_odbc ;extension=pdo_pgsql ;extension=pdo_sqlite
Tips : To open the corresponding configuration, you only need to remove the semicolon in front of the configuration item ;, And then restart Apache The server can .
Verify whether the relevant configuration is successfully enabled , Just execute phpinfo() Function is OK , Search the output page for the name of the configuration , If it exists, it indicates that the opening is successful , As shown in the figure below :
“ How to change php.ini File support pdo Abstraction layer ” That's all for , Thanks for reading . If you want to know more about the industry, you can pay attention to Yisu cloud website , Xiaobian will output more high-quality practical articles for you !
边栏推荐
- Super detailed steps for pushing wechat official account H5 messages
- Const decorated member function problem
- MySQL实战优化高手07 生产经验:如何对生产环境中的数据库进行360度无死角压测?
- MySQL实战优化高手09 生产经验:如何为生产环境中的数据库部署监控系统?
- 16 medical registration system_ [order by appointment]
- Use JUnit unit test & transaction usage
- Typescript入门教程(B站黑马程序员)
- MySQL实战优化高手06 生产经验:互联网公司的生产环境数据库是如何进行性能测试的?
- MySQL27-索引优化与查询优化
- How to make shell script executable
猜你喜欢
随机推荐
Google login prompt error code 12501
[unity] simulate jelly effect (with collision) -- tutorial on using jellysprites plug-in
MySQL实战优化高手07 生产经验:如何对生产环境中的数据库进行360度无死角压测?
寶塔的安裝和flask項目部署
Mysql27 - Optimisation des index et des requêtes
Mysql36 database backup and recovery
Vscode common instructions
Pytorch RNN actual combat case_ MNIST handwriting font recognition
MySQL combat optimization expert 12 what does the memory data structure buffer pool look like?
百度百科数据爬取及内容分类识别
MySQL real battle optimization expert 08 production experience: how to observe the machine performance 360 degrees without dead angle in the process of database pressure test?
Advantages and disadvantages of evaluation methods
The programming ranking list came out in February. Is the result as you expected?
MySQL ERROR 1040: Too many connections
Southwest University: Hu hang - Analysis on learning behavior and learning effect
Baidu Encyclopedia data crawling and content classification and recognition
Nanny hand-in-hand teaches you to write Gobang in C language
The governor of New Jersey signed seven bills to improve gun safety
Pytoch LSTM implementation process (visual version)
MySQL实战优化高手03 用一次数据更新流程,初步了解InnoDB存储引擎的架构设计