IndexController.class.php 943 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?php
  2. namespace Admin\Controller;
  3. /**
  4. * 后台默认控制器
  5. *
  6. */
  7. class IndexController extends AdminController
  8. {
  9. /**
  10. * 默认方法
  11. *
  12. */
  13. public function index()
  14. {
  15. $version=M('version')->where('id!=0')->order('id desc')->select();
  16. $this->assign('meta_title', "首页");
  17. $this->assign('version', $version);
  18. $this->display();
  19. }
  20. /**
  21. * 默认方法
  22. *
  23. */
  24. public function index2()
  25. {
  26. $this->display();
  27. }
  28. /**
  29. * 默认方法
  30. *
  31. */
  32. public function index3()
  33. {
  34. $this->display();
  35. }
  36. /**
  37. * 删除缓存
  38. *
  39. */
  40. public function removeRuntime()
  41. {
  42. $file = new \Util\File();
  43. $result = $file->del_dir(RUNTIME_PATH);
  44. if ($result) {
  45. $this->success("缓存清理成功");
  46. } else {
  47. $this->error("缓存清理失败");
  48. }
  49. }
  50. }