php function extension_loaded () Usage Example
This article mainly introduces the PHP function extension_loaded () usage, the example analyzes the function extension_loaded () to check whether an extension has loaded the specific usage, and adds to the view of the native loaded PHP extension methods, the need for friends can refer to the following
This example describes the PHP function extension_loaded () usage. Share to everyone for your reference. The specific analysis is as follows:
extension_loaded-Check if an extension is already loaded
For example:
The code is as follows:
if (!extension_loaded (' GD ')) {
if (!DL (' gd.so ')) {
Exit
}
}
?>
The code above determines whether the GD library extension is loaded.
Add:
To see how PHP has opened the extension:
Command-line CMD interface:
Input: Php-m
The results appear as follows:
Copy the code code 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 is helpful to everyone's PHP programming.
http://www.bkjia.com/PHPjc/971938.html www.bkjia.com true http://www.bkjia.com/PHPjc/971938.html techarticle php function extension_loaded () Usage example this article mainly introduces the PHP function extension_loaded () usage, the example analyzes the function extension_loaded () Check whether an extension has been loaded ...