Posted By

avenirer on 01/23/13


Tagged

extension pdo


Versions (?)

Verify if PDO extension is installed


 / Published in: PHP
 

Code to verify is PDO extension is installed.

  1. <?php
  2. if (!defined('PDO::ATTR_DRIVER_NAME'))
  3. {
  4. echo 'PDO unavailable';
  5. }
  6. elseif (defined('PDO::ATTR_DRIVER_NAME'))
  7. {
  8. echo 'PDO available';
  9. }
  10. ?>

Report this snippet  

You need to login to post a comment.