卸载扩展程序后,我立即在我的 opencart 商店中收到此错误。完整的商店不再工作。它没有我自己的模板,所有的 php 函数都不起作用。出现此错误:
Warning: fopen(/my_path/system/logs/): failed to open stream: Is a directory in /my_path/system/library/log.php on line 6
这是日志类:
class Log {
private $handle;
public function __construct($filename) {
//this is line 6
$this->handle = fopen(DIR_LOGS . $filename, 'a');
}
public function write($message) {
fwrite($this->handle, date('Y-m-d G:i:s') . ' - ' . print_r($message, true) . "\n");
}
public function __destruct() {
fclose($this->handle);
}
}
看起来 $filename 变量为空。这也反映了我上面提到的不工作的 php。日志目录是 755,我用 777 试了一下。
我的商店底部显示了第二个错误:
Fatal error: Call to a member function get() on a non-object in /homepages/6/d421894284/htdocs/opencart/upload/index.php on line 104
有人在 Opencart 2.0.1.1 中遇到过这个错误吗?谷歌说,这一定是一个常见的错误,但我找不到解决方案。