Exemple #1
0
 /**
  * Constructor.
  */
 private function __construct()
 {
     try {
         try {
             $actual_link = "{$_SERVER['REQUEST_URI']}";
             $arr = explode('/', $actual_link);
             if ('business' == $arr[2]) {
                 require_once "Constant.php";
             } else {
                 require_once "Constant.php";
             }
         } catch (Exception $e) {
         }
         $this->connection = Constant::createConnectionForDB();
         $this->connection->exec("SET CHARACTER SET utf8");
     } catch (PDOException $e) {
         print "Error!: " . $e->getMessage() . "<br/>";
         die;
     }
 }