diff --git a/App/Bootstrap.php b/App/Bootstrap.php index a809125..f3fe836 100644 --- a/App/Bootstrap.php +++ b/App/Bootstrap.php @@ -10,11 +10,13 @@ public function __construct() { define('APP_PATH', str_replace('\\', '/', realpath(dirname(__FILE__) . '/')) . "/"); define('ROOT_PATH', str_replace('\\', '/', realpath(dirname(__FILE__, 2) . '/')) . "/"); define('PUBLIC_PATH', ROOT_PATH . 'Public'); - $whoops = new \Whoops\Run; - $whoops->pushHandler(new \Whoops\Handler\PrettyPageHandler); - $whoops->register(); + define('PHP_CONFIG_AUTO_PATH', APP_PATH . 'config/'); define('PHP_CONFIG_PATH', APP_PATH . 'config/'); + // 调试模式 + // $whoops = new \Whoops\Run; + // $whoops->pushHandler(new \Whoops\Handler\PrettyPageHandler); + // $whoops->register(); } public static function Auth_Config($key = null) { if (self::$app == null) { diff --git a/App/Router.php b/App/Router.php index 429166c..999d7e3 100644 --- a/App/Router.php +++ b/App/Router.php @@ -7,14 +7,8 @@ Route::get('/', 'App\Home\Controller\HomeController@main'); Route::get('/login', 'App\Home\Member\Login@index'); -Route::get('/phpinit', function() { - phpinfo(); -}); Route::get('/code', 'App\Home\Controller\QrodeController@index'); Route::get('/captcha', 'App\Home\Member\Captcha@index'); -Route::get('/about', function() { - echo 'about!'; -}); Route::error(function() { echo '404 !'; }); diff --git a/App/admin/controller/CommonController.php b/App/admin/controller/CommonController.php index 421d875..e758d20 100644 --- a/App/admin/controller/CommonController.php +++ b/App/admin/controller/CommonController.php @@ -5,10 +5,10 @@ class CommonController { protected $templateEngine; protected $_medoo_mysql; public function __construct() { - ini_set('session.save_path', realpath(dirname($_SERVER['DOCUMENT_ROOT']) . '/App/file/tmp')); - ini_set('session.auto_start', 0); - ini_set('session.gc_probability', 1); - ini_set('session.gc_maxlifetime', 1500); + // ini_set('session.save_path', realpath(dirname($_SERVER['DOCUMENT_ROOT']) . '/App/file/tmp')); + // ini_set('session.auto_start', 0); + // ini_set('session.gc_probability', 1); + // ini_set('session.gc_maxlifetime', 1500); session_start(); $loader = new \Twig\Loader\FilesystemLoader(APP_PATH . 'admin/view'); $this->templateEngine = new \Twig\Environment($loader, ['debug' => true, 'cache' => APP_PATH . './file/cache_admin', 'auto_reload' => true, ]); diff --git a/App/admin/view/include/js.html b/App/admin/view/include/js.html index a1e8a8c..096b73f 100644 --- a/App/admin/view/include/js.html +++ b/App/admin/view/include/js.html @@ -1,4 +1,4 @@ - \ No newline at end of file +
diff --git a/App/admin/view/user/login.html b/App/admin/view/user/login.html index 3aa4f4a..79f1163 100644 --- a/App/admin/view/user/login.html +++ b/App/admin/view/user/login.html @@ -121,7 +121,7 @@