Home  >  Article  >  Backend Development  >  PHP function extension_loaded();, extensionloaded_PHP tutorial

PHP function extension_loaded();, extensionloaded_PHP tutorial

WBOY
WBOYOriginal
2016-07-13 10:11:05895browse

PHP function extension_loaded();, extensionloaded

extension_loaded Check whether an extension has been loaded

For example:

<?php
if (!extension_loaded('gd')) {
    if (!dl('gd.so')) {
        exit;
    }
}
?>

Whether to load the gd library extension

Win7->cmd->php -m
[PHP Modules]
bcmath
bz2
calendar
com_dotnet
ctype
curl
date
dom
filter
ftp
gd
hash
iconv
json
libxml
mbstring
mcrypt
mysql
mysqli
odbc
pcre
PDO
pdo_mysql
PDO_ODBC
pdo_sqlite
Reflection
session
SimpleXML
sockets
SPL
SQLite
standard
tokenizer
wddx
xml
xmlreader
xmlwriter
Zend Optimizer
zip
zlib

[Zend Modules]
Zend Extension Manager
Zend Optimizer


D:PhpphpStudyphp52>

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/931390.htmlTechArticlePHP function extension_loaded();, extensionloaded extension_loaded checks whether an extension has been loaded. For example: ?phpif (!extension_loaded(' gd')) { if (!dl('gd.so')) { exit; }}? Whether...
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