예제 #1
0
 public function __construct()
 {
     $this->dbhost = get_dbhost();
     $this->dbuser = get_dbuser();
     $this->dbpw = get_dbpw();
     $this->dbname = get_dbname();
     $this->dbsocket = get_dbsocket();
     $this->dbport = get_dbport();
     $this->etuliite = get_etuliite();
     mb_internal_encoding('UTF-8');
     mb_http_output('UTF-8');
     mb_http_input('UTF-8');
     if (empty($this->dbsocket)) {
         $this->local_db = mysqli_connect($this->dbhost, $this->dbuser, $this->dbpw) or die;
         mysqli_select_db($this->local_db, $this->dbname) or die;
     } else {
         $this->local_db = mysqli_connect($this->dbhost, $this->dbuser, $this->dbpw, $this->dbname, $this->dbport, $this->dbsocket) or die;
     }
 }
예제 #2
0
<?php

require dirname(__FILE__) . 'template/';
get_dbname('');