- 首先到根目錄下的build.php文件中去 是這樣子滴:
- 然后去public目錄中的index.php中去添加代碼 這樣子;
然后運行項目 就搞定了。 是不是美滋滋!
在public 下index.php添加的代碼如下:
//這是build.php里面的模板 'admin' => [ '__file__' => ['common.php'], '__dir__' => ['behavior','controller','model','veiw','lang'], 'controller' => ['Admin'], 'model' => ['Test'], 'view' => ['index/Index'], ], //這是index.php下添加的代碼 $build = include '../build.php'; //運行自動生成 \think\Build::run($build);
SEE YOU ARGIN!