【发布时间】:2017-09-22 02:46:14
【问题描述】:
我有以下关于 open_basedir 限制的问题。
is_file(): open_basedir restriction in effect. File(/home/dev/bongos.com/vendor/bcosca/fatfree/lib/action/authaction.php) is not within the allowed path(s): (/home/Dev/bongos.com/:/tmp/)
路径不同的原因是f3方法。
protected function autoload($class) {
$class=$this->fixslashes(ltrim($class,'\\'));
$func=NULL;
if (is_array($path=$this->hive['AUTOLOAD']) &&
isset($path[1]) && is_callable($path[1]))
list($path,$func)=$path;
foreach ($this->split($this->hive['PLUGINS'].';'.$path) as $auto)
if ($func && is_file($file=$func($auto.$class).'.php') ||
is_file($file=$auto.$class.'.php') ||
is_file($file=$auto.strtolower($class).'.php') ||
is_file($file=strtolower($auto.$class).'.php'))
return require($file);
}
在倒数第二行,它将路径转换为小写以检查它是否存在。如果是这样,它会失败并出现上述错误。
我无法禁用 open_basedir 或操纵任何标准 f3 代码。
编辑
我的自动加载看起来像这样。
AUTOLOAD= Apps/
【问题讨论】:
-
你的
AUTOLOAD变量是什么样的? -
@xfra35 感谢您的关注。我已更新我的问题以包含我的自动加载变量。
标签: php fat-free-framework open-basedir