Home > php教程 > php手册 > PHP 函数extension_loaded();,extensionloaded

PHP 函数extension_loaded();,extensionloaded

WBOY
Release: 2016-06-13 09:18:21
Original
1329 people have browsed it

PHP 函数extension_loaded();,extensionloaded

extension_loaded — 检查一个扩展是否已经加载

例如:

<?php
if (!extension_loaded('gd')) {
    if (!dl('gd.so')) {
        exit;
    }
}
?>
Copy after login

是否加载  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>

Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template