Add code in the middle of http{} in the nginx.conf file in the conf directory. The principle used is nginx's reverse proxy
<code> add_header Access<span>-Control</span><span>-Allow</span><span>-Origin</span><span>*</span>; add_header Access<span>-Control</span><span>-Allow</span><span>-Headers</span> X<span>-Requested</span><span>-With</span>; add_header Access<span>-Control</span><span>-Allow</span><span>-Methods</span> GET,POST,OPTIONS;</code>
The above introduces the multi-project cross-domain ajax implementation under nginx, including the content of nginx and ajax. I hope it will be helpful to friends who are interested in PHP tutorials.