我有个奇怪的问题。当我提交表单时,整个网站都会重定向到索引。表单方法为post。当我将其更改为get时,一切都会正常进行。那么问题出在哪里呢?
表单代码:
<form action="<?php echo $this->baseUrl('/search/general'); ?>" method="post">
<table class="wf">
<tr>
<td>
<a href="#" onclick="$('#general_search').submit(); return false;">
<img src="<?php echo $this->baseUrl('images/dec/search-left.gif'); ?>" style="width: 18px; height: 20px;" alt="" />
</a>
</td>
<td class="input-text">
<input type="text" name="general_search_query" id="general_search_query" value="" />
</td>
<td>
<a href="#" title="" onclick="$('#general_search_query').val(''); return false;">
<img src="<?php echo $this->baseUrl('images/dec/search-right.gif'); ?>" style="width: 15px; height: 20px;" alt="" />
</a>
<input type="submit" name="submit" value="x" />
</td>
</tr>
</table>
</form> 搜索控制器的一般方法:
public function generalAction(){
//empty
}和general.phtml代码:
print_r($_POST);使用站点中的其他表单,一切都是正常的。但这一次,就是错了。有什么提示吗?
您的帮助我们将不胜感激。
发布于 2010-08-19 20:14:53
试着检查你的参数:
Zend_Debug::dump($this->getRequest()->getParams());
https://stackoverflow.com/questions/3513264
复制相似问题