Discuz!X优化“Oops! System file lost”文件不存在的代码错误提示

“Oops! System file lost: xxxxx”的错误提示,在第三方sdk或插件中问题表现尤其突出。这里的解决方案中,增加两个提示错误的条件 ,
第一:系统DEBUG时;第二:存在文件所在的文件夹时。

打开文件source/class/class_core.php

查找:
} else {
throw new Exception(‘Oops! System file lost: ‘.$filename);
}

替换为:
} elseif(DISCUZ_CORE_DEBUG || is_dir(dirname($path.’/’.$filename))) {
throw new Exception(‘Oops! System file lost: ‘.$filename);
}

相关文章:

1、Discuz!X程序结构图
https://www.onexin.net/discuz-x-program-structure-diagram/

2、DX无后缀名图片下载,后缀名指(.jpg/.gif)
https://www.onexin.net/dx-extension-picture-download-extension-means-jpg-gif/

3、整合程序注册时自动激活DZX会员 for discuz!X 1.5
https://www.onexin.net/up-the-integration-process-is-automatically-activated-when-the-dzx-member-for-discuz-x-1-5/

转载请注明出处:https://www.onexin.net/discuzxoops-system-file-lost/

Leave a Reply

Your email address will not be published. Required fields are marked *