Home > Backend Development > PHP Tutorial > 如何查看一个写在php.ini的so模块是否已经被加载?

如何查看一个写在php.ini的so模块是否已经被加载?

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-06 20:30:15
Original
1493 people have browsed it

如何查看一个写在php.ini的so模块是否已经被加载?

回复内容:

如何查看一个写在php.ini的so模块是否已经被加载?

<code>php</code><code>if (!extension_loaded('gd')) {
    if (!dl('gd.so')) {
        exit;
    }
}
php -m |grep gd
</code>
Copy after login

CLI: php -i | grep YOUR_EXT_NAME,或者直接php -m

FastCGI / ISAPI / CGI: phpinfo();

楼上的办法可以,如果在不能运用命令行的情况下或者phpinfo不可用,
用array ini_get_all ([ string $extension [, bool $details = true ]] )可以帮你。

Related labels:
php
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template