1,安装tp6
composer create-project topthink/think tp
2 创建多应用模式安装扩展
composer require topthink/think-multi-app
3 快速生成模块应用,
php think build admin
4 创建模块下的 控制器类
生成资源控制器:
php think make:controller admin@Blog
生成空的控制器:
php think make:controller admin@Blog --plain
5 创建模块下的 model类
php think make:model admin@Blog
6 伪静态
<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>