2013-01-09 32 views
2

我正在接收錯誤:324在鉻時,當我試圖顯示ZF的表格v1.12.1。我完全按照官方網站上的官方示例「快速入門指南」完成,並且仍然如此。之後,我發現了脾氣暴躁的(不知道的第二個名字如何拼寫(很抱歉,)),該代碼:與Zend_Form的錯誤

class Application_Form_Login extends Zend_Form 
{ 
    public function __construct($options = null) 
    { 
     parent::__construct($options); 
     $this->setAction($options['action'])->setMethod('post'); 

     $email = new Zend_Form_Element_Text('name', array('required' => true)); 
     $pass = new Zend_Form_Element_Password('password', array('required' => true)); 
     $submit = new Zend_Form_Element_Submit('submit', array('label' => 'Login', 'ignore' => true)); 
     $this->addElement(array($email, $pass, $submit)); 
    } 
} 

是在我使用更好,更實用。任何方式,當我嘗試運行任何的例子(官方文檔或HES的例子)我在Chrome得到這個錯誤:

Error 324 (net::ERR_EMPTY_RESPONSE): The server closed the connection without sending any data.

Tryed所有可能的修復和一切(防火牆關閉,關閉Chrome網絡預測等等)沒有幫助。當我在調用Form時對代碼發表評論時,所有事情都回到了聯機狀態。我正在使用:

Version 22.0.1229.94 Ubuntu 12.10 (161065) Chromium

任何可能的解決此問題的方法?

PS:我是這個代碼的形式:

public function indexAction() 
    { 
     $form = new Application_Form_Login(array('action' => '/index/index')); 

     $this->view->form = $form; 


    } 

僅是控制器,當問題被固定一切將被添加。

PS2: 在向ZF提交問題之前想問這裏。

回答

1

$this->addElements(array($email, $pass, $submit));

使用addElements添加多個元件