クエリがあります: https://myaddress.ee/admin/usersearchajax?country=EE&query=arno
$this->_request->getParam('query');
戻り値: NULL
var_dump($_REQUEST['クエリ']);
戻り値: string(5) "arno"
この問題を解決するにはどうすればよいですか? zend フレームワークで GET 値を取得する方法を意味しますか? クエリ文字列を変更できないとしましょう。
zend バージョン 1.11.11
public function usersearchajaxAction(){
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender( true );
$userService = new Application_Services_User();
$userList = $userService->searchByName($this->_request->getParam('query'));
$this->_helper->json($userService->getArrayForAutoComplete($this->_request->getParam('query'), $userList));
}
問題が見つかりました。私のプロジェクトには $_GET 変数のオーバーライドがありました。ですので、今は修正です。これを読んで考えてくれてありがとう