No Description
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.

install.php 1.5KB

123456789101112131415161718192021222324252627282930313233343536
  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. // 建议安装完成后移除此文件
  15. namespace think;
  16. if (version_compare(PHP_VERSION, '7.2.5', '<')) {
  17. header("Content-type: text/html; charset=utf-8");
  18. die('PHP 7.2.5 及以上版本系统才可运行~ ');
  19. }
  20. define('IF_PUBLIC', true);
  21. define('ROOT_PATH', __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR);
  22. define('APP_PATH', ROOT_PATH . 'application' . DIRECTORY_SEPARATOR);
  23. // 加载基础文件
  24. require ROOT_PATH . 'thinkphp' . DIRECTORY_SEPARATOR . 'base.php';
  25. // 执行应用并响应
  26. Container::pull('app')->bind('\app\admin\command\Install')->run()->send();
  27. /*PS:如果你的网站空间不支持域名绑定目录
  28. 1.请将index.php放置根目录(不推荐)
  29. 2.注释第23行代码 define('IF_PUBLIC', true);
  30. 3.第24行改成 define('ROOT_PATH', __DIR__ . DIRECTORY_SEPARATOR);
  31. */