可以看到console出現了: Access to XMLHttpRequest at 'http://192.168.56.1/cors/index.php' from origin 'http://127.0.0.1' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
console如上圖,Access to XMLHttpRequest at 'http://192.168.56.1/cors/index.php' from origin 'http://127.0.0.1' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
Access to XMLHttpRequest at 'http://192.168.56.1/cors/index.php' from origin 'http://127.0.0.1' has been blocked by CORS policy: Request header field content-type is not allowed by Access-Control-Allow-Headers in preflight response.