$this->request->data为您提供控制器中的帖子数据。
public function hottest_products(){ if( $this->request->is('ajax') ) { $this->autoRender = false; } if ($this->request->isPost()) { // get values here echo $this->request->data['start_time']; echo $this->request->data['end_time']; }}更新 您的Ajax错误,
$.ajax({ url: "/orders/hot_products", type: 'POST', data: {"start_time": from, "end_time": to }, success: function(data){ alert("success"); }});


