dongshen4129 2015-07-08 12:50
浏览 398
已采纳

在javascript中写入Access-Control-Allow-Origin:或Origin的位置?

So I came to know by searching that I need to set my Access-Control-Allow-Origin: or Origin tags. But where?? Suggestions were to use these in header.

I can't see find anything that explained this. Can anyone please tell me where to put this tags and how!!

  • 写回答

2条回答 默认 最新

  • drurhg37071 2015-07-08 12:58
    关注

    In your PHP file * I guess you have ajax request, etc.*

    <?php
    header('Access-Control-Allow-Origin : *'); 
    
    ...
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?