当前位置:网站首页>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 .

边栏推荐
- What should I do to dynamically add a column and button to the gird of VFP?
- cnds
- Deeply understand Flink SQL execution process based on flink1.12
- Flink partition policy
- 9 cases where elements cannot be located
- Semaphore source code analysis
- redis的dict的扩容机制(rehash)
- 使用php脚本查看已开启的扩展
- Windows11 MySQL service is missing
- 云原生数据湖以存储、计算、数据管理等能力通过信通院评测认证
猜你喜欢

Recommend a virtual machine software available for M1 computer

Share 7 immortal wallpaper websites, let the new wallpaper give you a little joy, and don't fall into the repetition year after year.

为什么ping不通网站 但是却可以访问该网站?

Real software developers will use this method to predict the future

Windows11 MySQL service is missing

架构师为你揭秘在阿里、腾讯、美团工作的区别

SQL injection vulnerability (type chapter)

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

redis的dict的扩容机制(rehash)

Why distributed IDS? What are the distributed ID generation schemes?
随机推荐
Black Horse Chang Shopping Mall - - - 3. Gestion des produits de base
How TCP handles exceptions during three handshakes and four waves
Cesium building loading (with height)
Nacos installation and use
Kotlin基础
黑馬暢購商城---3.商品管理
依概率收敛
ThingsPanel 发布物联网手机客户端(多图)
cnds
Oracle Spatial creating spatial tables
VFP calls the command line image processing program, and adding watermark is also available
交易期货沪镍产品网上怎么开户
Mui scroll bar recovery
Spark runs wordcount (case 1)
Is it safe to open an account and buy stocks? Who knows
quarkus saas动态数据源切换实现,简单完美
Under what circumstances will Flink combine operator chains to form operator chains?
. Using factory mode in net core
客户经理的开户二维码开户买股票安全吗?有谁知道啊
The service layer reports an error. The XXX method invalid bound statement (not found) cannot be found