Guest User

Untitled

a guest
May 26th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. <?php
  2. class BaseModel
  3. {
  4. var $_dbconn;
  5. public function init()
  6. {
  7. if(!$this->_dbconn = mysqli_connect(DB_HOSTNAME,DB_USERNAME,DB_PASSWORD,DB_DBNAME))
  8. {
  9. throw new Exception("Failed to connect to database.");
  10. }
  11. }
  12. }
  13. ?>
Add Comment
Please, Sign In to add comment