Ajax Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource

前端 未结 11 1517
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-02 16:55

I\'m writing a simple site that takes as input an idiom, and return its meaning(s) and example(s) from Oxford Dictionary. Here\'s my idea:

I send a request to the fol

11条回答
  •  伪装坚强ぢ
    2020-12-02 17:45

    We can not get the data from third party website without jsonp.

    You can use the php function for fetch data like file_get_contents() or CURL etc.

    Then you can use the PHP url with your ajax code.

    
    

    Create a PHP file = get_data.php

    
    

提交回复
热议问题