# rhfpms **Repository Path**: coderbutcher/rhfpms ## Basic Information - **Project Name**: rhfpms - **Description**: 供学生研究开发使用教程 - **Primary Language**: PHP - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2018-01-30 - **Last Updated**: 2020-12-28 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## 简介 采用Thinkphp框架开发的供学生学习使用的教程
thinkphp在nginx下面部署的时候,需要使用rewrite模式来支持pathinfo。
在配置文件中使用下面的模式:
'URL_MODEL' => 2, // URL访问模式,可选参数0、1、2、3,代表以下四种模式:
// 0 (普通模式); 1 (PATHINFO 模式); 2 (REWRITE 模式); 3 (兼容模式) 默认为PATHINFO 模式
然后在nginx的vhost下面的配置文件中,需要配置好rewrite模式的规则
location / {
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?s=/$1 last;
break;
}
}
重启nginx服务即可。 经验: 如果是没有使用封装的dataGrade直接使用的form表单,最好是用js来控制表单的提交。方便按钮的动作,否则按钮会和submit动作一样提交。