简体   繁体   English

PHP Framework Zend无法正常工作

[英]PHP Framework Zend not Working

When I try to load it some error occurs that prevents the rest of the page from loading. 当我尝试加载它时,发生了一些错误,导致页面其余部分无法加载。

My file basically looks like this: 我的文件基本上如下所示:

use Zend\Form\Form;

include 'Zend/Form/Form.php';

$form = new Form();

// Page Content

What am I doing wrong? 我究竟做错了什么?

PHP Errors: PHP错误:

Fatal error: Class 'Zend\\Form\\Fieldset' not found in /Applications/MAMP/htdocs/wordpress/wp-content/plugins/contest-guess-image/Zend/Form/Form.php on line 24 致命错误:在第24行的/Applications/MAMP/htdocs/wordpress/wp-content/plugins/contest-guess-image/Zend/Form/Form.php中找不到类'Zend \\ Form \\ Fieldset'

You can't use ZF2 without autoloading. 没有自动加载功能,您将无法使用ZF2。 Composer makes this easy, if you're not using composer you'll need to setup the ZF2 standard autoloader yourself before using any other ZF2 classes. Composer使此操作变得容易,如果您不使用Composer,则需要在使用任何其他ZF2类之前自行设置ZF2标准自动加载器

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM