Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class BaseModel
- {
- var $_dbconn;
- public function init()
- {
- if(!$this->_dbconn = mysqli_connect(DB_HOSTNAME,DB_USERNAME,DB_PASSWORD,DB_DBNAME))
- {
- throw new Exception("Failed to connect to database.");
- }
- }
- }
- ?>
Add Comment
Please, Sign In to add comment