首页 > 代码库 > ThinkPhp 生成静态页面

ThinkPhp 生成静态页面

//开启静态缓存
‘HTML_CACHE_ON‘ => true, //开启缓存
‘HTML_CACHE_TIME‘ =>60, //开启缓存时间
‘HTML_FILE_SUFFIX‘ => ‘.shtml‘, //生成缓存文件的后缀名
‘HTML_PATH‘ => ‘Html‘, //生成缓存文件保存目录

‘HTML_CACHE_RULES‘=>array(
‘Index:index‘ => ‘{:controller}/{:action}‘,
‘Seller:index‘ => ‘{:controller}/{:action}‘,
‘Course:index‘ => ‘{:controller}/{:action}‘ ,
//‘Course/cat/‘ => ‘{:controller}/{:action}‘ ,
‘Course:cat‘=>‘{:controller}/{:action}_{cat}‘,
‘Course:detail‘=>‘{:controller}/{:action}_{id}‘,
‘Task:task‘=>‘{:controller}/{:action}‘,
‘Dailyanswer:dailyQuesAns‘=>‘{:controller}/{:action}_{history}‘,
‘Dailyanswer:answer‘=>‘{:controller}/{:action}_{id}_{hid}‘,
)

ThinkPhp 生成静态页面