[英]Cannot redeclare class but there are no other classes with that name
I am working right now with Zend Framework
and I've created a Model_User_Row
in app\\models\\User\\Row.php
. 我与现在的工作
Zend Framework
和我创建了一个Model_User_Row
在app\\models\\User\\Row.php
。
When I try to create an instance of that class in IndexController
I get an error: 当我尝试在
IndexController
创建该类的实例时,出现错误:
Fatal error: Cannot redeclare class Model_User_Row in
F:\Projekty\www\inz\app\models\User\Row.php on line 14
14th line is a close brace. 第14行是一个大括号。
<?php
class Model_User_Row extends Zend_Db_Table_Row
{
/**
* @return array
*/
public function toArray()
{
$res = parent::toArray();
unset($res['password']);
return $res;
}
} // #14
In my project I have no other class called Model_User_Row
. 在我的项目中,没有其他名为
Model_User_Row
类。
I am a bit confused - how to debug this case ? 我有点困惑-如何调试这种情况?
在使用Zend_Loader时,应检查以确保已正确配置/编码它,并且此后它没有尝试多次加载类文件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.