api.php 416 B

12345678910111213141516171819202122
  1. <?php
  2. $env=@file_get_contents('.env');
  3. if (empty($env)) {
  4. $env=@file_get_contents('../../.env');
  5. }
  6. $is_yunshop=strpos($env,"APP_Framework");
  7. $extend = '';
  8. $boot_file = __DIR__ . '/../../framework/bootstrap.inc.php';
  9. if (!$is_yunshop) {
  10. include_once $boot_file;
  11. } else {
  12. $extend = '/../..';
  13. }
  14. include_once __DIR__ . $extend . '/app/laravel.php';
  15. include_once __DIR__ . $extend . '/app/yunshop.php';