二、执行:php think build Home或admin,生成应用目录
根据文档,得删除原来的controller文件目录
三、然后再config文件夹里的app.php里修改代码:
// 自动多应用模式
'auto_multi_app' => true,
// 开启应用快速访问
'app_express' => true,
// 默认应用
'default_app' => 'home',
四、在nginx里添加和修改配置:##这是Home应用
location / {
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?s=/$1 last;
}
index index.php index.html error/index.html;
autoindex off;
}
##这是admin应用
location /admin/ {
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?s=/$1 last;
}
autoindex off;
}
五、这是成功图片:最佳答案
