且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何确定是否在PHP中启用了PDO?

更新时间:2023-02-22 13:27:32

检查该类是否存在:

Check if the class exists:

if (class_exists('PDO'))

我很感谢我的支持以及我仍然得到的所有支持,但请查看 Salman Abbas的答案以获取正确的方法.

I appreciate the support and all the upvotes I still get, but please check Salman Abbas's answer for the proper way to do this.