我基本上需要能够通过 $q 那是 将搜索表单的变量传递给 Controller ,然后 Controller 调用 api 并执行 使用 $q..(它可以是 ID、ISBN 或书名)进行搜索。
http://pastebin.com/zMZxnJ81这是我的看法
http://pastebin.com/JQ3HmFA9这是我的 Controller
我无法将数据从 View 传递到 Controller ,我得到了 if 语句的“最后条件”消息。
最佳答案
表单方法属性可以设置为“get”或“post”。您设置的“请求”不是方法属性的有效值。
您可以查看您的 php.ini 以获取 $_REQUEST super 全局数组设置,例如 request_order 设置。
也是使用 Zend 请求对象函数的更好方法,例如
$this->_request->getParams()
$this->_request->getParam($key)
关于php - 将数据从 View 传递到 Controller (Zend),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8353703/