PHP open_basedir-返回值?

PHP open_basedir-返回值?,php,return,open-basedir,Php,Return,Open Basedir,我想在php脚本中返回open_basedir的值。。我怎么做? 如果值为空,则应回显为空 谢谢 是在php.ini 因此,您可以通过以下方式获取其当前值: 例如,如果在我的php.ini文件中以这种方式定义了open\u basedir: open_basedir = /data/www:/var/www:/home/squale/developpement/tests 然后,代码的以下部分: var_dump(ini_get('open_basedir')); 获取此输出: strin

我想在php脚本中返回open_basedir的值。。我怎么做? 如果值为空,则应回显为空

谢谢

是在
php.ini

因此,您可以通过以下方式获取其当前值:


例如,如果在我的
php.ini
文件中以这种方式定义了
open\u basedir

open_basedir = /data/www:/var/www:/home/squale/developpement/tests
然后,代码的以下部分:

var_dump(ini_get('open_basedir'));
获取此输出:

string '/data/www:/var/www:/home/squale/developpement/tests' (length=51)
string '/data/www:/var/www:/home/squale/developpement/tests' (length=51)