如何判断php mysqli扩展类是否开启

前端之家收集整理的这篇文章主要介绍了如何判断php mysqli扩展类是否开启前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

如何判断PHP MysqLi扩展类是否开启

PHP判断MysqLi扩展类是否开启,源码如下:

PHP;"> PHP /* by http://www.manongjc.com/article/1206.html */ function MysqLinstalled (){ if (function_exists ("MysqL_connect")){ return true; } else { return false; } } function MysqLiinstalled (){ if (function_exists ("MysqLi_connect")){ return true; } else { return false; } }

if (MysqLinstalled()){
echo "

The MysqL extension is installed.

";
} else {
echo "

The MysqL extension is not installed..

";
}
if (MysqLiinstalled()){
echo "

The MysqLi extension is installed.

";
} else {
echo "

The MysqLi extension is not installed..

";
}
?>

感谢阅读,希望能帮助到大家,谢谢大家对本站的支持

原文链接:https://www.f2er.com/php/18210.html

猜你在找的PHP相关文章