如何判断php mysqli扩展类是否开启
如何判断php mysqli扩展类是否开启
php判断mysqli扩展类是否开启,源码如下:
<?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 "<p>The mysql extension is installed.</p>"; } else { echo "<p>The mysql extension is not installed..</p>"; } if (mysqliinstalled()){ echo "<p>The mysqli extension is installed.</p>"; } else { echo "<p>The mysqli extension is not installed..</p>"; } ?>
感谢阅读,希望能帮助到大家,谢谢大家对本站的支持!
相关推荐
聪聪李 2020-09-10
WasteLand 2020-09-15
yifangs 2020-10-13
zyyjay 2020-11-09
xuebingnan 2020-11-05
samtrue 2020-11-22
stefan0 2020-11-22
songshijiazuaa 2020-09-24
hebiwtc 2020-09-18
天步 2020-09-17
83911535 2020-11-13
whatsyourname 2020-11-13
zhouyuqi 2020-11-10
Noneyes 2020-11-10
mathchao 2020-10-28
王志龙 2020-10-28
wwwsurfphpseocom 2020-10-28