jQuery Ajax request from local filesystem (Windows file:///)

前端 未结 3 1432

I\'m trying to do an ajax request to get the contents of \"http://localhost/\" running on Windows Wamp Server.

The script is running from something like

3条回答
  •  青春惊慌失措
    2020-11-27 07:26

    Problem Solved!

    I just had to add this header to my index.php file for http://localhost/

    header('Access-Control-Allow-Origin: *');

    Thanks for your help anyhow guys!

提交回复
热议问题