ajax call not working when trying to send data to localhost:8000 from localhost

后端 未结 5 1484
逝去的感伤
逝去的感伤 2020-12-06 19:33

When I\'m trying to make an AJAX call from php (localhost) to django (localhost:8000), it throws the following error.

XMLHt

5条回答
  •  再見小時候
    2020-12-06 20:00

    1) php does not make ajax requests. php executes on the server side; javascript executes on the client side, and it is js that makes ajax requests to the server.

    2) js does not allow you to make ajax requests to a different host than the one from which the current page was obtained from.

提交回复
热议问题