1
我有一個奇怪的問題。當我提交表格時,整個網站都會重定向到索引。表單方法是post。當我改變它得到時,一切順利。那麼問題是什麼?Zend-framework:發佈數據問題
表單代碼:
<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);
與其他形式在網站上一切正常。但是,這只是錯誤的。任何提示?
您的幫助,將不勝感激。
那麼它與其他代碼的地方衝突。尋找bug ... – Bounce 2010-08-18 15:27:04