file_exists/www/web/app/.//bbb.php返回false并报告openbasedir限制的错误


file_exists /www/web/app/aaa/../../bbb.php return false and report the error of open_basedir restriction

file_exists('/www/web/app/aaa/../../bbb.php')返回false。

报告的错误为:

open_basedir restriction in effect.

open_basedir参数正常,并且文件存在。为什么?

PHP56.9和CentOS6.5

open_basedir是一个配置指令,用于将PHP可以访问的文件限制在指定的目录树中,包括文件本身。

您需要通过.htaccess或其他方式将该目录添加到您的配置中。

您可以使用php_admin_value open_basedir [directory]