Skip to content

Commit

Permalink
调整应用和命令行入口文件
Browse files Browse the repository at this point in the history
  • Loading branch information
liu21st committed Sep 29, 2017
1 parent 7abb2ee commit d9317ee
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
10 changes: 8 additions & 2 deletions public/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@
// +----------------------------------------------------------------------

// [ 应用入口文件 ]
namespace think;

// 加载框架引导文件
require __DIR__ . '/../thinkphp/start.php';
// 加载基础文件
require __DIR__ . '/../thinkphp/base.php';

// 支持事先使用静态方法设置Request对象和Config对象

// 执行应用并响应
Container::get('app')->run()->send();
10 changes: 8 additions & 2 deletions think
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,11 @@
// | Author: yunwuxin <[email protected]>
// +----------------------------------------------------------------------

// 加载框架引导文件
require './thinkphp/console.php';
namespace think;

// 加载基础文件
require __DIR__ . '/thinkphp/base.php';

// 执行应用
Container::get('app', [__DIR__ . '/application/'])->initialize();
Console::init();

0 comments on commit d9317ee

Please sign in to comment.