【发布时间】:2016-04-11 10:02:48
【问题描述】:
这是我的脚本:
$.post('index.php?r=site/filterbyprice',{
price_range:values,
_csrf : $("#csrftoken").val()
}
,function(r){
console.log(r);
if(r==""){
$("#all-ads").html('<div class="error-page"></div>');
}
else{
$("#all-ads").html(r);
}
});
控制器代码:
public function actioAbc(){
echo 'inside abc';
}
我面临以下错误:跨域请求被阻止:同源策略不允许读取位于http://mandigoods.com/frontend/web/index.php?r=site/abc 的远程资源。 (原因:CORS 标头 'Access-Control-
【问题讨论】: