Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 ZF1 中,我可以执行以下操作来获取 $_POST 和 $_GET 值。
$this->getRequest()->getParam('foo');
ZF2中是否有类似的方法?
开箱即用,您不能单独检查两者:
$this->getRequest()->getPost('foo'); // $_POST $this->getRequest()->getQuery('foo'); // $_GET
在我的jsp中,如果我打电话<form action="/sampleServlet" method="get" name="form1">,我会得到以下异常:
<form action="/sampleServlet" method="get" name="form1">
http 404 错误--未找到 sampleServlet。我在 web.xml 文件中设置