当前位置:网站首页>Use PHP script to view the opened extensions
Use PHP script to view the opened extensions
2022-06-25 12:03:00 【lxw1844912514】
Official line phpinfo() The function is disabled , But I want to know PHP Installed those extensions , What shall I do? ?
php The expansion package will be compiled during installation , For a running database , see php Extended open status of ,
The first one is : View through the configuration file .
The second kind : stay PHP-FPM In the , We can go through phpinfo() Function to view the current PHP Status and extension related information of .
The third kind of : stay CLI In command line scripts , We can use php -m Command to view the loaded extensions .
A fourth : Use php Built in functions to view , View through script output , The code is as follows :
<?php
print_r(get_loaded_extensions());
?>adopt get_loaded_extensions The function can return php An array of extended opening conditions , Then you can print it out
By looking at the source code, you can clearly see the opening of the extension :

in addition , PHP It also provides us with functions that can view the extension status during dynamic operation .
See if the extension has been loaded
echo extension_loaded("redis");
// 1A very simple function , Its function is to check whether an extension has been loaded . It returns a Boolean value , When the extension is loaded, it returns true , If the extension is not loaded , Then return to false .

边栏推荐
- 网络上开户买股票是否安全呢?
- Niuke.com: host scheduling
- 一個硬件工程師走過的彎路
- Keywords serializable serialization and deserialization
- Comment TCP gère - t - il les exceptions lors de trois poignées de main et de quatre vagues?
- Thingspanel releases Internet of things mobile client (multiple pictures)
- 9 cases where elements cannot be located
- quarkus saas动态数据源切换实现,简单完美
- Nacos installation and use
- . Using factory mode in net core
猜你喜欢

What is the development history, specific uses and structure of the chip

PD1.4转HDMI2.0转接线拆解。

ThingsPanel 发布物联网手机客户端(多图)

Sentinel integrated Nacos data source

Develop two modes of BS mode verification code with VFP to make your website more secure

VFP uses Kodak controls to control the scanner to solve the problem that the volume of exported files is too large

Niuke.com: host scheduling

Why can't the form be closed? The magic of revealing VFP object references

What are redis avalanche, penetration and breakdown?

Windows11 MySQL service is missing
随机推荐
黑马畅购商城---1.项目介绍-环境搭建
图片打标签之获取图片在ImageView中的坐标
Deeply understand Flink SQL execution process based on flink1.12
数据库系列:MySQL索引优化总结(综合版)
Caused by: org. xml. sax. SAXParseException; lineNumber: 1; columnNumber: 10; Processing matching '[xx][mm][ll]' is not allowed
Why can't you Ping the website but you can access it?
CFCA Anxin sign access
Customize to prevent repeated submission of annotations (using redis)
Nacos installation and use
ROS 笔记(06)— 话题消息的定义和使用
Idea uses the fast request interface for debugging
元素定位不到的 9 种情况
Database Series: MySQL index optimization summary (comprehensive version)
RecyclerView滚动到指定位置
一個硬件工程師走過的彎路
Pd1.4 to hdmi2.0 adapter cable disassembly.
The cloud native data lake has passed the evaluation and certification of the ICT Institute with its storage, computing, data management and other capabilities
How TCP handles exceptions during three handshakes and four waves
Idea local launch Flink task
Spark runs wordcount (case 2)