简体   繁体   English

无法重新声明课程,但没有其他使用该名称的课程

[英]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_Rowapp\\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.

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