2012-12-14 46 views
0

在我的webapp /的index.php我已经定义的include_path如下图所示:致命错误:类“的Zend 表格元素”未找到

<?php 
    set_include_path(implode(PATH_SEPARATOR, array(
     'C:\Program Files\NetBeans 7.1.2\php\library', 
     get_include_path() 
    ))); 
    require_once 'Zend\Form\Fieldset.php'; 
?> 
<html> 
    <head> 
     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 
     <title></title> 
    </head> 
    <body> 
     <?php 
      #do something with Fieldset class; 
     ?> 
    </body> 
</html> 

但我一直当我运行收到此错误信息该文件:

Fatal error: Class 'Zend\Form\Element' not found in C:\Program Files\NetBeans 7.1.2\php\library\Zend\Form\Fieldset.php 

感谢您的帮助。

回答

0

我从来没有试过像这样使用zf(out of its mvc),但我猜你需要设置自动加载器,以便Zend可以找到它的不同类。

通常Zend的自动加载会寻找类Zend_Form_Element_Text在\ Zend的\表格\元素\ Text.php

看一看在documentation

相关问题