php function extension_loaded () Usage example, extensionloaded
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:
Copy the Code code as follows: <?php
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/944572.html www.bkjia.com true http://www.bkjia.com/PHPjc/944572.html techarticle php function extension_loaded () Usage example, extensionloaded This example describes the PHP function extension_loaded () usage. Share to everyone for your reference. The specific analysis is as follows: Extension_ ...