コード例 #1
0
 /**
  * New Quickstart instance
  *
  * @param string $rootpath Path to system root
  */
 public function __construct($rootpath)
 {
     $this->rootpath = realpath($rootpath);
     if ($this->rootpath === false) {
         trigger_error("Unable to start your app when root path is invalid");
     }
     # Initialize constants
     $this->defineConstants();
     $this->_loadRoutes();
     self::$instance = $this;
 }
コード例 #2
0
ファイル: index.php プロジェクト: allenlinatoc/quickstart
<?php

// Set internal encoding
mb_internal_encoding("UTF-8");
// Path separator definition
/**
 * Filesystem path separator for current file system
 */
define("SEP", !in_array(preg_match("/^WIN/i", PHP_OS), [false, 0]) ? "\\" : "/");
// Load autoloader
require_once __DIR__ . "/../00000/autoload.php";
// Set exception handler
set_exception_handler(array("System", "HandleException"));
$quickstart = new Quickstart(__DIR__ . "/../");
$quickstart->start();