PHP function extension_loaded() usage example, extensionloaded
The example in this article describes the usage of PHP function extension_loaded(). Share it with everyone for your reference. The specific analysis is as follows:
extension_loaded — Check if an extension has been loaded
For example:
Copy code The code is as follows:
if (!extension_loaded('gd')) {
If (!dl('gd.so')) {
exit;
}
}
?>
The above code determines whether to load the gd library extension.
Supplement:
How to check the enabled extension of PHP:
Command line cmd interface:
Input: php -m
The results are displayed as follows:
Copy code The code is as follows:
[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
[Zend Modules]
I hope this article will be helpful to everyone’s PHP programming design.
http://www.bkjia.com/PHPjc/944572.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/944572.htmlTechArticlePHP function extension_loaded() usage example, extensionloaded This example describes the usage of PHP function extension_loaded(). Share it with everyone for your reference. The specific analysis is as follows: extension_...
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