87183
framework/base/helper.class.php 中的 import() 存在 BUG
回帖数 1
阅读数 1825
发表时间 2017-12-06 12:11:43
static public function import($file)
{
$file = realpath($file); // 需要增加此处理,否则会因为相对路径和绝对路径导致 redeclare class 错误
if(!is_file($file)) return false;
static $includedFiles = array();
if(!isset($includedFiles[$file]))
{
include $file;
$includedFiles[$file] = true;
return true;
}
return true;
}
{
$file = realpath($file); // 需要增加此处理,否则会因为相对路径和绝对路径导致 redeclare class 错误
if(!is_file($file)) return false;
static $includedFiles = array();
if(!isset($includedFiles[$file]))
{
include $file;
$includedFiles[$file] = true;
return true;
}
return true;
}
联系我们
联系人
金娟/高级客户经理
电话(微信)
18562856230
QQ号码
1826606239
联系邮箱
jinjuan@chandao.com

相关帖子
很润居士 | 最后回帖 2022-03-23 16:43 禅道-李锡碧
不要命的火锅 | 最后回帖 2024-09-10 08:41 马超
李军 | 最后回帖 2024-02-23 16:11 禅道-阿龙
自信的熊猫 | 最后回帖 2025-10-28 08:37 禅道-王誉霖
石红霞 | 最后回帖 2019-03-11 16:29 禅道-李锡碧
孙晓松 | 最后回帖 2019-08-19 17:44 王林
石洋洋


精品资料包
1V1产品演示
免费试用增强功能
专属顾问答疑支持


