html.php 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?php
  2. /**
  3. * 易优CMS
  4. * ============================================================================
  5. * 版权所有 2016-2028 海南赞赞网络科技有限公司,并保留所有权利。
  6. * 网站地址: http://www.eyoucms.com
  7. * ----------------------------------------------------------------------------
  8. * 如果商业用途务必到官方购买正版授权, 以免引起不必要的法律纠纷.
  9. * ============================================================================
  10. * Author: 小虎哥 <1105415366@qq.com>
  11. * Date: 2018-4-3
  12. */
  13. $html_cache_arr = array();
  14. // 全局变量数组
  15. $global = config('tpcache');
  16. empty($global) && $global = tpCache('global');
  17. // 系统模式
  18. $web_cmsmode = isset($global['web_cmsmode']) ? $global['web_cmsmode'] : 2;
  19. /*页面缓存有效期*/
  20. $app_debug = true;
  21. $uiset = input('param.uiset/s', 'off');
  22. if (1 == $web_cmsmode && 'on' != $uiset) { // 运营模式
  23. $app_debug = false;
  24. $html_cache_arr = config('HTML_CACHE_ARR');
  25. }
  26. /*--end*/
  27. return array(
  28. // 应用调试模式
  29. 'app_debug' => $app_debug,
  30. // 模板设置
  31. 'template' => array(
  32. // 模板路径
  33. 'view_path' => './template/',
  34. // 模板后缀
  35. 'view_suffix' => 'htm',
  36. // 模板引擎禁用函数
  37. 'tpl_deny_func_list' => 'eval,echo,exit',
  38. // 默认模板引擎是否禁用PHP原生代码 苦恼啊! 鉴于百度统计使用原生php,这里暂时无法开启
  39. 'tpl_deny_php' => false,
  40. ),
  41. // 视图输出字符串内容替换
  42. 'view_replace_str' => array(
  43. '__EVAL__' => '', // 过滤模板里的eval函数,防止被注入
  44. ),
  45. /**假设这个访问地址是 www.xxxxx.dev/home/goods/goodsInfo/id/1.html
  46. *就保存名字为 index_goods_goodsinfo_1.html
  47. *配置成这样, 指定 模块 控制器 方法名 参数名
  48. */
  49. 'HTML_CACHE_ARR'=> $html_cache_arr,
  50. );
  51. ?>