2010-02-22 76 views
0

嗨,Zend_Form自定義裝飾器導致空白頁

我想使用自定義裝飾與Zend_Form。我創建了定製的裝飾和使用TEH下面的代碼

$form = new Zend_Form(); 
$form->addElementPrefixPath("Moon_Form_Decorator","Moon/Form/Decorator/","decorator"); 


$form->setAction("/question/index/ask-process")->setMethod("post"); 

$title = new Zend_Form_Element_Text('title'); 
$title->setRequired(true)->setDecorators(array("Test")); 

$title->setAttrib("class","inputText"); 

$tag = new Zend_Form_Element_Text('tag'); 
$tag->setRequired(true)->setDecorators(array("ViewHelper","Errors")); 
$tag->setAttrib("class","inputText"); 

$form->addElement($title); 
$form->addElement($tag); 



return $form; 

如果我用$形式 - > addElementPrefixPath(「Moon_Form_Decorator」,「月亮/表格/裝飾/」,「裝飾」);,我的MVC只顯示白色空白FF上的頁面,IE上的「Internet Explorer無法顯示網頁」。

我該怎麼辦?

回答

2

空白頁通常表示解析錯誤。你有錯誤報告轉向「up」嗎?即

error_reporting(E_STRICT);