111
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

39 lines
1.1 KiB

  1. <?php
  2. /**
  3. * @copyright (C)2016-2099 Hnaoyun Inc.
  4. * @author XingMeng
  5. * @email hnxsh@foxmail.com
  6. * @date 2018年2月14日
  7. * 首页控制器
  8. */
  9. namespace app\home\controller;
  10. use core\basic\Controller;
  11. class IndexController extends Controller
  12. {
  13. protected $parser;
  14. public function __construct()
  15. {
  16. $this->parser = new ParserController();
  17. }
  18. // 首页
  19. public function index()
  20. {
  21. $content = parent::parser('index.html'); // 框架标签解析
  22. $content = $this->parser->parserBefore($content); // CMS公共标签前置解析
  23. $content = $this->parser->parserPositionLabel($content, - 1, '首页', SITE_DIR . '/'); // CMS当前位置标签解析
  24. $content = $this->parser->parserSpecialPageSortLabel($content, 0, '', SITE_DIR . '/'); // 解析分类标签
  25. $content = $this->parser->parserAfter($content); // CMS公共标签后置解析
  26. $this->cache($content, true);
  27. }
  28. // 空拦截
  29. public function _empty()
  30. {
  31. error('您访问的地址有误,请核对后重试!');
  32. }
  33. }