安装,根据PHP的版本安装适合的版本
composer create-project topthink/think tp
开启多应用模式
composer require topthink/think-multi-app
创建应用
php think build admin
nginx 配置伪静态,把下面的内容保存为nginx.htaccess文件放到应用入口public文件的同级目录下
location / {
if ( !-e $request_filename){
rewrite ^/(.*)$ /index.php?s=$1 last;
break;
}
}
apache伪静态规则 ,把下面的内容保存为.htaccess文件放到应用入口public文件的同级目录下(官方)
<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>
引用视图模板引擎
composer require topthink/think-view
安装自带验证码
composer require topthink/think-captcha
标签:thinkphp8,简要,文件,流程,require,composer,topthink,php,think From: https://www.cnblogs.com/51delphi/p/17991286