12345678910111213141516171819202122232425262728293031 |
- <?php
- namespace think;
- require __DIR__ . '/../vendor/autoload.php';
- header('Access-Control-Allow-Origin:*');
- header('Access-Control-Allow-Methods:POST,GET,OPTIONS,DELETE');
- header("Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept, Authorization");
- if($_SERVER['REQUEST_METHOD']=="OPTIONS"){
- echo '';
- exit();
- }
- $http = (new App())->http;
- $response = $http->run();
- $response->send();
- $http->end($response);
|