致命错误:(.... PATH)中找不到类NAME? [英] Fatal error: Class NAME not found in (....PATH)?

查看:128
本文介绍了致命错误:(.... PATH)中找不到类NAME?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果遇到以下错误,可能是什么问题。

What may be the problem if i get the following error.

在扩展课程时,出现了此错误

while i am extending a class i got this error

示例:


class ModuleUser扩展
AbstractModule

class ModuleUser extends AbstractModule

致命错误:(.... PATH)中找不到类AbstractModule吗?

Fatal error: Class AbstractModule not found in (....PATH) ?

我已经做了很多可能性。

I have done most of the possibilities... But i can't resolve the problem.

任何帮助都会感激

感谢n前进

Fero

推荐答案

在您定义ModuleUser之前,请导入文件

Prior to your definition of ModuleUser, import the file that contains the definition for AbstractModule.

require_once 'path/to/abstract_module.php';

如果两个类都在同一文件中,请确保在之后定义类ModuleUser ,您定义了AbstractModule。

If both classes are in the same file, then make sure you define the class ModuleUser after you define AbstractModule.

这篇关于致命错误:(.... PATH)中找不到类NAME?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆