thinkphp 3.2.1多个模块使用公共layout
文件 thinkphp\library\think\template.class.php
第104行$layoutfile = theme_path.c('layout_name').$this->config['template_suffix'];修改为$layoutfile = empty(c('layout_path'))?theme_path.$array['name'].$this->config['template_suffix']:c('layout_path').c('layout_name').$this->config['template_suffix'];第208行$layoutfile = theme_path.$array['name'].$this->config['template_suffix'];修改为$layoutfile = empty(c('layout_path'))?theme_path.$array['name'].$this->config['template_suffix']:c('layout_path').c('layout_name').$this->config['template_suffix'];在common模块下的配置文件中设置公共layout目录 'layout_path'=>'layout路径'
ad:真正免费,域名+虚机+企业邮箱=0元