【发布时间】:2010-11-23 08:05:40
【问题描述】:
require_once'modules/logger.php';
$Logger = new Logger();
require_once 'templates/list.php';
$Templates = new templatesList();
require_once 'widgets/list.php';
$Widgets = new widgetsList();
我在templates/list.php 和widgets/list.php 中使用$Logger。
$Templates我在/widgets/list.php中使用。
上面的代码抛出这个错误:
注意:未定义变量:
Loggerin.../templates/list.php第 99 行 致命错误:调用成员函数toLog()中的非对象.../templates/list.php第 99 行
UPD 这是第 99 行:
$Logger->toLog( $contentData );
【问题讨论】:
-
你的第 99 行在哪里?可以发一下吗?
标签: php require-once