index.php 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <?php
  2. /**
  3. * Laravel - A PHP Framework For Web Artisans
  4. *
  5. * @package Laravel
  6. * @author Taylor Otwell <taylor@laravel.com>
  7. */
  8. header('Access-Control-Allow-Origin: https://rencai.jiangzi.xin');
  9. header("Access-Control-Allow-Methods:GET, POST, OPTIONS, DELETE");
  10. header('Access-Control-Allow-Credentials:true');
  11. header("Access-Control-Allow-Headers:DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type, Accept-Language, Origin, Accept-Encoding,x-xsrf-token");
  12. define('LARAVEL_START', microtime(true));
  13. /*
  14. |--------------------------------------------------------------------------
  15. | Register The Auto Loader
  16. |--------------------------------------------------------------------------
  17. |
  18. | Composer provides a convenient, automatically generated class loader for
  19. | our application. We just need to utilize it! We'll simply require it
  20. | into the script here so that we don't have to worry about manual
  21. | loading any of our classes later on. It feels great to relax.
  22. |
  23. */
  24. require __DIR__.'/../vendor/autoload.php';
  25. /*
  26. |--------------------------------------------------------------------------
  27. | Turn On The Lights
  28. |--------------------------------------------------------------------------
  29. |
  30. | We need to illuminate PHP development, so let us turn on the lights.
  31. | This bootstraps the framework and gets it ready for use, then it
  32. | will load up this application so that we can run it and send
  33. | the responses back to the browser and delight our users.
  34. |
  35. */
  36. $app = require_once __DIR__.'/../bootstrap/app.php';
  37. /*
  38. |--------------------------------------------------------------------------
  39. | Run The Application
  40. |--------------------------------------------------------------------------
  41. |
  42. | Once we have the application, we can handle the incoming request
  43. | through the kernel, and send the associated response back to
  44. | the client's browser allowing them to enjoy the creative
  45. | and wonderful application we have prepared for them.
  46. |
  47. */
  48. $kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);
  49. $response = $kernel->handle(
  50. $request = Illuminate\Http\Request::capture()
  51. );
  52. $response->send();
  53. $kernel->terminate($request, $response);