1.安装后的单应用更改为多应用
1)、执行composer require topthink/think-multi-app命令
2)、删除app下的controller文件夹
2.windows 下开启调试
1)、.env文件创建不了,在linux服务器上创建该文件,压缩、下载、解压到app同级目录,设置APP_DEBUG = true
3.Apache 下去掉url中的index.php
<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>
有的服务器需要“?”,有的服务器去掉“?”,不会的可以尝试两次
4.return view();出错(tp6不在内置模板引擎)
如果使用tp的模板引擎,用如下命令:composer require topthink/think-view