2017-06-21 64 views
-2

嗨,我当我发布的数据,以我的后端,我使用PHP和我已经允许在后端的头部得到这个错误下面附图。由于角4 PHP后台发布错误

enter image description here

+0

的消息告诉您用简单的英语缺什么。 – CBroe

+0

但我已经实现了头('访问控制 - 允许 - 原产地:*');在后端..当即时通讯使用http.get没有问题,我遇到 – Arcubalino

+0

_“但我已经实现了头('访问控制 - 允许 - 原产地:*');在后端“_--对你来说非常好 - 但这不是错误消息提到的标题。 – CBroe

回答

0

嗨,大家好,我得到我只是说了下面的参数在我的岗位答案。下面的代码:

create(item){ 
 
     let headers = new Headers({ 'Content-Type': 'application/x-www-form-urlencoded' }); 
 
     let options = new RequestOptions({ headers: headers }); 
 
     
 
    return this.http.post("your_url_here.com/index.php",item,options) 
 
    .map(data => data.json()) 
 
    .toPromise(); 
 
}