Index.php 775 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. declare (strict_types = 1);
  3. namespace app\home\controller;
  4. use app\home\BaseController;
  5. use think\facade\View;
  6. class Index extends BaseController
  7. {
  8. public function index()
  9. {
  10. add_user_log('view', '首页');
  11. $count = \think\facade\Db::name('UserLog')->where(array('type' => 'down'))->count();
  12. // return View('',['count'=>$count]);
  13. }
  14. public function logs()
  15. {
  16. add_user_log('view', '开发日志');
  17. return View('');
  18. }
  19. public function down()
  20. {
  21. $version = CMS_VERSION;
  22. add_user_log('down', $version.'版本代码');
  23. header("Location: https://www.gougucms.com/storage/gougucms_v".$version."_full.zip");
  24. //确保重定向后,后续代码不会被执行
  25. exit;
  26. }
  27. }