Skip to content

Commit

Permalink
更新
Browse files Browse the repository at this point in the history
  • Loading branch information
Tokyo-Lei committed Oct 13, 2020
1 parent 37941c5 commit 95face5
Show file tree
Hide file tree
Showing 11 changed files with 22 additions and 285 deletions.
8 changes: 5 additions & 3 deletions App/Bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
6 changes: 0 additions & 6 deletions App/Router.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 !';
});
Expand Down
8 changes: 4 additions & 4 deletions App/admin/controller/CommonController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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, ]);
Expand Down
2 changes: 1 addition & 1 deletion App/admin/view/include/js.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<script src="{{ PUBLIC_ADMIN }}/js/jquery.min.js"></script>
<script src="{{ PUBLIC_ADMIN }}/js/popper.min.js"></script>
<script src="{{ PUBLIC_ADMIN }}/js/bootstrap.min.js"></script>
<script type="text/javascript" src="https://v1.cnzz.com/z_stat.php?id=1279338078&web_id=1279338078"></script>
<div style="display: none;"><script type="text/javascript" src="https://v1.cnzz.com/z_stat.php?id=1279338078&web_id=1279338078"></script></div>
4 changes: 2 additions & 2 deletions App/admin/view/user/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ <h2>Admin Login</h2>


</script>

<script type="text/javascript" src="https://v1.cnzz.com/z_stat.php?id=1279338078&web_id=1279338078"></script>
<div style="display: none;"><script type="text/javascript" src="https://v1.cnzz.com/z_stat.php?id=1279338078&web_id=1279338078"></script>
</div>
</body>
</html>
36 changes: 0 additions & 36 deletions App/admin/view/user/user_group_add copy.html

This file was deleted.

20 changes: 0 additions & 20 deletions App/home/member/Login.php

This file was deleted.

7 changes: 2 additions & 5 deletions App/home/member/LoginController.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,10 @@
use App\home\member\_Validate;
class LoginController {
public function index() {

}
public function login() {
$data = ['name' => 'thinkphp', 'email' => 'thinkphp', 'age' => '[email protected]', ];
$validateNew = new _Validate();
if (!$validateNew->check($data)) {
var_dump($validateNew->getError());
}

}
}

199 changes: 0 additions & 199 deletions App/library/Auth.class.php

This file was deleted.

16 changes: 8 additions & 8 deletions Public/.htaccess
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
RewriteEngine On
RewriteBase /

# Allow any files or directories that exist to be displayed directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.*)$ index.php?$1 [QSA,L]
<IfModule mod_rewrite.c>
Options +FollowSymlinks -Multiviews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?/$1 [QSA,PT,L]
</IfModule>
1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
"App\\": "App"
},
"files":[
"App/library/Auth.class.php",
"App/library/Validatecode.php",
"App/library/File.class.php"
]
Expand Down

0 comments on commit 95face5

Please sign in to comment.