Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require_once('system/class.mysql_config.php');
- class HRF_MySQLi extends mysql_config
- {
- private $connection;
- private static $m_pInstance;
- public $db_host;
- public $db_user;
- public $db_pass;
- public $db_name;
- public function __construct()
- {
- //echo "Constructor called<br />\n";
- $this->db_host = $this->config_mysql_host;
- $this->db_user = $this->config_mysql_user;
- $this->db_pass = $this->config_mysql_pass;
- $this->db_name = $this->config_mysql_name;
- //connectie maken
- $this->connection = new mysqli($this->db_host,$this->db_user,$this->db_pass,$this->db_name);
- if (mysqli_connect_errno()) {
- printf("Kan niet connecteren met MySQL Server. Errorcode: %s <br />", mysqli_connect_error());
- exit;
- }
- //encoding op UTF-8 zetten
- $this->connection->query("SET NAMES 'utf8'");
- return $this->connection;
- }
- }
Add Comment
Please, Sign In to add comment