我发布了一些用于注册到CakePHP控制器操作的表单值。该代码是这样的AJAX发布到CakePHP控制器操作
var params='firstname='+encodeURIComponent(firstname) +'&lastname='+encodeURIComponent(lastname)+'&emailid='+encodeURIComponent(emailid)+'&password='+encodeURIComponent(password);
xmlhttp.open('POST', url, true);
xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlhttp.send(params);
这是做发布,我可以在POST节源看到它的萤火虫作为
firstname=name&lastname=name&emailid=mymailid&password=123123
但是,当我在行动打印$这个 - >数据,它不会显示任何值。我甚至使用$ _POST,它也返回任何东西..
我在这里做了什么错误..?
我已经添加了它并使用了$ this-> params ['url'];和$ this-> request ['url'];第一个只显示我发布的URL,第二个没有显示任何内容。 – 2012-04-24 05:43:10