1.去官网下载thinkcmf / ThinkCMF--6.0
2. 去 thinkcmf / ThinkCMF企业门户解决方案-->下载
3.然后把第二步文件合并到第一步哪里
4.用phpstudy创建网站
配置好nginx文件
location / {
index index.php index.html index.htm;
#如果请求既不是一个文件,也不是一个目录,则执行一下重写规则
if (!-e $request_filename)
{
#地址作为将参数rewrite到index.php上。
rewrite ^/(.*)$ /index.php?s=$1;
#若是子目录则使用下面这句,将subdir改成目录名称即可。
#rewrite ^/subdir/(.*)$ /subdir/index.php?s=$1;
}
}
location /api/ {
index index.php index.html index.htm;
#如果请求既不是一个文件,也不是一个目录,则执行一下重写规则
if (!-e $request_filename)
{
#若是子目录则使用下面这句,将subdir改成目录名称即可。
rewrite ^/api/(.*)$ /api.php?s=$1;
}
}
location ~* ^\/upload\/.+\.(html|php)$ {
return 404;
}
location ~* ^\/plugins\/.+\.(html|php)$ {
return 404;
}
location ~* ^\/themes\/.+\.(html|php)$ {
return 404;
}
5.启动安装数据库
6.安装成功后删除安装程序
composer remove thinkcmf/cmf-install
设置调试模式:
1.把.example.env复制一分 名字修改为.env
2.然后留下第一行其余的全部删除;
伪静态处理:
location / {
if (!-e $request_filename){
rewrite ^(.*)$ /index.php?s=$1 last; break;
}
}