我已经阅读了几个已经存在与这个或类似名称的线程。似乎没有人能准确地解决我的情况。
我在utils.php
课堂上遇到了这个错误。
Notice: Undefined variable: debug in /app/www/utils.php on line 89 Fatal error: Call to a member function debug() on a non-object in /app/www/utils.php on line 89
我这样定义变量debug
:
require_once('PHPDebug.php');
$debug = new PHPDebug();
然后像这样调用它(在第 89 行):
$debug->debug($message);
我如此困惑的原因是我从我的这些行中复制并粘贴了这些行,index.php
并且该调用工作得很好。
如果需要,我可以包含指向index.php
和utils.php
文件的链接,以及PHPDebug.php
.