#1.extension_loaded#2.function_exists //用来判断扩展库里的某个方法存不存在
get_loaded_extensions ()
范例:
<?phpprint_r(get_loaded_extensions());?> 以上例程的输出类似于:Array( [0] => xml [1] => wddx [2] => standard [3] => session [4] => posix [5] => pgsql [6] => pcre [7] => gd [8] => ftp [9] => db [10] => calendar [11] => bcmath)
检测是否支持gd库
<?php
if (!extension_loaded('gd')) {
if (!dl('gd.so')) {
exit;
}
}
?>