예제 #1
0
 public function __construct()
 {
     if (isset(self::$current)) {
         throw new ConstructionException('Cannot construct more than one instance of singleton class Scout.');
     }
     $this->_parse_url();
     self::$current = $this;
     #$user = new user();
     #Gbl::store('user',$user);
     Gbl::store('subdomain', $this->_parse_subdomain());
 }
예제 #2
0
파일: index.php 프로젝트: NateBrune/bithub
<?php

/*
 * index.php
 *
 * All traffic goes through here.
 *
 * copyright 2015 zcor
 *
 */
if (!file_exists("../config/node.conf.php")) {
    die(file_get_contents("install.html"));
}
require_once '../config/node.conf.php';
mb_internal_encoding("UTF-8");
mb_http_output("UTF-8");
ob_start("mb_output_handler");
try {
    $scout = new Scout();
    $controller = $scout->get_controller();
    $controller->run();
} catch (Exception $e) {
    Gbl::get('system_log')->write(LOG_LEVEL_ERROR, 'Fatal website error (index.php):' . $e->getMessage());
    if (MODE == 'staging') {
        die("LOGJAMMIN! " . $e->getMessage());
    } else {
        die('Exception Logged!');
    }
}
ob_end_flush();