【发布时间】:2015-01-13 06:24:32
【问题描述】:
这是我的 Angular js 函数
$scope.submitform = function () {
$http.post('http://localhost:90/vendor/dashboard/accountinfosave/',
{'uname': 'vikrant', 'pswd': '111', 'email': 'bhallavikrantvir@gmail.com'}
).success(function(data) {
alert("success");
}).error(function(data) {
alert("error occured");
});
};
这是我的 Zend 框架控制器函数。
public function accountinfosaveAction(){
$data = $this->getRequest()->getPost();
print_r($data);// not working
print_r($_POST);// not working
}
问题是我想访问我使用$http.post函数从Angular Js发送到zend框架的数据(uname,pswd,email)。
如果我使用 $.ajax 函数,它可以正常工作。但是$http.post 不起作用。
请帮帮我。
【问题讨论】:
标签: javascript php angularjs zend-framework