基于全新 ThinkPHP5.0开发
更规范的代码,遵循PSR-2命名规范和PSR-4自动加载规范
更规范的数据库设计
前后台完全基于bootstrap3
增加 api 模块(需单独下载)
支持 composer 管理第三方库
核心化:独立核心代码包
应用化:开发者以应用的形式增加项目模块
插件化:更强的插件机制,开发者以插件形式扩展功能
模板化:模板完全傻瓜式,用户无须改动任何代码即可在后台完成模板设计和配置
增加 URL美化功能,支持别名设置,更简单
独立的回收站功能,可以管理所有应用临时删除的数据
统一的资源管理,相同文件只保存一份
注解式的后台菜单管理功能,方便开发者代码管理后台菜单
文件存储插件化,默认支持七牛文件存储插件
模板制作标签化,内置多个cmf标签,方便小白用户
更人性化的导航标签,可以随意定制 html 结构
后台首页插件化,用户可以定制的网站后台首页
nginx配置:
server{
listen 80;
server_name demo5.thinkcmf***;
root 你的 ThinkCMF5目录/public; # 该项要修改为你准备存放相关网页的路径
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)
{
#地址作为将参数rewrite到index.php上。
#rewrite ^/(.*)$ /index.php?s=$1;
#若是子目录则使用下面这句,将subdir改成目录名称即可。
rewrite ^/api/(.*)$ /api/index.php?s=$1;
}
}
location ~* ^\/upload\/.+\.(html|php)$ {
return 404;
}
location ~* ^\/plugins\/.+\.(html|php)$ {
return 404;
}
location ~* ^\/themes\/.+\.(html|php)$ {
return 404;
}
#proxy the php scripts to php-fpm
location ~ \.php {
include fastcgi_params;
##pathinfo支持start
#定义变量 $path_info ,用于存放pathinfo信息
set $path_info "";
#定义变量 $real_script_name,用于存放真实地址
set $real_script_name $fastcgi_script_name;
#如果地址与引号内的正则表达式匹配 if ($fastcgi_script_name ~ "^(.+?\.php)(/.+)$") {
#将文件地址赋值给变量 $real_script_name
set $real_script_name $1;
#将文件地址后的参数赋值给变量 $path_info
set $path_info $2;
}
#配置fastcgi的一些参数
fastcgi_param SCRIPT_FILENAME $document_root$real_script_name;
fastcgi_param SCRIPT_NAME $real_script_name;
fastcgi_param PATH_INFO $path_info;
###pathinfo支持end
fastcgi_intercept_errors on;
fastcgi_pass 127.0.0.1:9000;
# fastcgi_pass 如果是 sock形式,可能是下面的配置
# fastcgi_pass unix:/tmp/php-cgi.sock }}
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号