How to determine if PDO is enabled in PHP?

后端 未结 6 1613
轻奢々
轻奢々 2020-12-01 09:13

Is there a PHP command I can use to determine if PDO is enabled or disabled?

I know I an manually run phpinfo() and eyeball it, but I have a script I run various web

6条回答
  •  不知归路
    2020-12-01 09:41

    How about

    if (in_array('pdo', get_loaded_extensions())) {
       ... pdo is there ...
    }
    

提交回复
热议问题