【发布时间】:2015-10-25 00:31:03
【问题描述】:
突然间我收到以下错误,导致我无法登录到我的管理员,并且它也显示在店面的标题上
Notice: Use of undefined constant DIR_LOG - assumed 'DIR_LOG' in /home/user/public_html/system/library/openbay/ebay.php on line 150Notice: Use of undefined constant DIR_LOG - assumed 'DIR_LOG' in /home/user/public_html/system/library/openbay/ebay.php on line 150Warning: rename(DIR_LOGebaylog.log,DIR_LOG_ebaylog_2015-10-25_00-23-22.log): No such file or directory in /home/user/public_html/system/library/openbay/ebay.php on line 150Warning: Cannot modify header information - headers already sent by (output started at /home/user/public_html/admin/index.php:84) in /home/user/public_html/system/library/response.php on line 12
这是第 150 行 /home/user/public_html/system/library/openbay/ebay.php 中的代码
rename(DIR_LOG . 'ebaylog.log', DIR_LOG . '_ebaylog_' . date('Y-m-d_H-i-s') . '.log');
我检查并在 config.php 中正确定义了 DIR_LOG 非常感谢任何识别和解决问题的帮助
【问题讨论】:
-
没有代码无法回答,但单独找到正确的副本
-
@Fred-ii- 我应该分享什么代码?这是标准的 opencart 2.0.3.1
-
你在其中和周围使用
DIR_LOG的代码。它失败的可能原因太多了。隐藏的字符,使用的引号...... -
@Fred-ii- 我将代码添加到问题中,有帮助吗?
-
请参阅php.net/manual/en/function.define.php
define("CONSTANT", "Hello world.");如果DIR_LOG没有像该示例那样定义,那么您将需要这样做。DIR_LOG就是这样;一个常数。您需要显示 config.php 中的内容以确保并用假货替换实际凭据。
标签: php opencart opencart2.x opencart-module