extension_loaded — 檢查一個擴展是否已經加載
例如:
<?php if (!extension_loaded('gd')) { if (!dl('gd.so')) { exit; } } ?>
是否加載 gd 庫擴展
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:\Php\phpStudy\php52>