1. Cross-domain problem: In short, a domain name of the program to get information from the file under the B domain name (this is what I see on the Internet)
2. General request (Local test): Request page Response page It is no problem to do so. But if I change the URL of the AJAX request to http://127.0.0.1/TestJQ/Test1/ajax.php, it's going to be a problem. The console will report XMLHttpRequest cannot load HTTP://127.0.0.1/ testjq/test1/ajax.php. No ' Access-control-allow-origin ' header is present on the requested resource. Origin ' http://localhost ' is therefore not allowed access. Error, which is caused by cross-domain problems in this case, if we add a header message to the response page, of course, the header ("Ac Cess-control-allow-origin: * "); the" * "indicates that requests to all sites allow us to use the specified URLs, indicating that only requests for these sites are allowed in fact, why the URLs are rewritten as HTTP://127.0.0.1/ Testjq/test1/ajax.php will cause cross-domain, I actually still do not understand, after all, the request page and Response page is in My Computer Apache server directory, but also trouble has great God passing the guidance, thank you ~ ~
Cross-domain issues with AJAX access to PHP pages