extension_loaded—检查一个扩展是否已经加载
例如:
<?phpif (!extension_loaded('gd')) { if (!dl('gd.so')) { exit; }}?>
是否加载 gd 库扩展
Win7->cmd->php -m[PHP Modules]bcmathbz2calendarcom_dotnetctypecurldatedomfilterftpgdhashiconvjsonlibxmlmbstringmcryptMySQLmysqliodbcpcrePDOpdo_mysqlPDO_ODBCpdo_sqliteReflectionsessionSimpleXMLsocketsSPLSQLitestandardtokenizerwddxxmlxmlreaderxmlwriterZend Optimizerzipzlib[Zend Modules]Zend Extension ManagerZend OptimizerD:\Php\phpStudy\php52>
(PHP 4, PHP 5)
get_loaded_extensions—返回所有编译并加载模块名的 array
array get_loaded_extensions ([ bool $zend_extensions = false ] )