控制台应用,yzncms本身基于tp5.1框架,里面的队列用不了,bug,坑
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.

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | Yzncms [ 御宅男工作室 ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2018 http://yzncms.com All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
  8. // +----------------------------------------------------------------------
  9. // | Author: 御宅男 <530765310@qq.com>
  10. // +----------------------------------------------------------------------
  11. // +----------------------------------------------------------------------
  12. // | [ 应用入口文件 ]
  13. // +----------------------------------------------------------------------
  14. namespace think;
  15. if (version_compare(PHP_VERSION, '7.2.5', '<')) {
  16. header("Content-type: text/html; charset=utf-8");
  17. die('PHP 7.2.5 及以上版本系统才可运行~ ');
  18. }
  19. define('IF_PUBLIC', true);
  20. define('ROOT_PATH', __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR);
  21. define('APP_PATH', ROOT_PATH . 'application' . DIRECTORY_SEPARATOR);
  22. // 判断是否安装
  23. if (!is_file(APP_PATH . 'admin/command/Install/install.lock')) {
  24. header("location:./install.php");
  25. exit;
  26. }
  27. // 加载基础文件
  28. require ROOT_PATH . 'thinkphp' . DIRECTORY_SEPARATOR . 'base.php';
  29. // 执行应用并响应
  30. Container::pull('app')->run()->send();
  31. /*PS:如果你的网站空间不支持域名绑定目录
  32. 1.请将index.php放置根目录(不推荐)
  33. 2.注释第23行代码 define('IF_PUBLIC', true);
  34. 3.第24行改成 define('ROOT_PATH', __DIR__ . DIRECTORY_SEPARATOR);
  35. */