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

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

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-06 20:30:151490browse

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

回复内容:

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

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

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

FastCGI / ISAPI / CGI: phpinfo();

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

Statement:
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