是否可以在失败之前检查一下?
if (is_in_open_basedir($path)) { }
您可以使用ini_get http://php.net/manual/en/function.ini-get.php获取 open_basedir 的当前值以检查其他值。