我尝试提供' $ _ REQUEST [' vider']'对于这样的其他控制器:
return $this->forward('TestBundle:Rapport:bo', array('vider' => 'vider'));
//, array ($_REQUEST['vider'] => 'vider) doesn't work too
但是在我的函数Rapport中:bo,$ _REQUEST [' vider']为空,我在数组中给出它,我失败了?
编辑: 我的交流:bo函数:
public function boAction(Request $request) {
var_dump($_REQUEST['vider']); // is null
if ( isset($_REQUEST['vider']) ) ) {
var_dump('test');
}
}
答案 0 :(得分:1)
尝试:
public function boAction($vider) {
your logic...