Home >php教程 >php手册 >php extension_loaded 判断GD扩展库是否加载

php extension_loaded 判断GD扩展库是否加载

WBOY
WBOYOriginal
2016-06-02 09:14:091224browse

<?php
if(!extension_loaded(&#39;gd&#39;)) 
{ 
  //如果没有加载,执行加载操作 
  if(!dl(&#39;gd.so&#39;)) 
  { 
    //如果加载失败,则结束所有操作 
    echo "gd库加载失败"; 
    exit;//开源代码phprm.com 
  } 
}


教程链接:

随意转载~但请保留教程地址★

Statement:
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