搜索热词
thinkPHP3.2中已配置:'URL_CASE_INSENSITIVE' => true,对于控制器及操作名大小写都可以,但仍对于模块名的大小写就运行机制出错,
比如:http://www.xxxx.com/Home 这是正常的,但换成http://www.xxxx.com/home就出错,
解决方案如下
修改 View.class.PHP 文件让大小写共存
替换 parseTemplate
publicfunctionparseTemplate($template=''){
if(is_file($template)){
return$template;
}
$depr=C('TMPL_FILE_DEPR');
$template=str_replace(':',$depr,$template);
//获取当前模块
$module=MODULE_NAME;
if(strpos($template,'@')){//跨模块调用模版文件
list($module,$template)=explode('@',$template);
}
//获取当前主题的模版路径
defined('THEME_PATH')ordefine('THEME_PATH',$this->getThemePath($module));
//分析模板文件规则
if(''==$template){
//如果模板文件名为空按照默认规则定位
$templa