PHP open_basedir - return a value?

I want to return the value of open_basedir to a PHP script .. how can I do this? If the value is empty, it should be an echo that is empty.

Thanks!

+6
php return open-basedir
source share
1 answer

open_basedir is a parameter configured in php.ini

So you can get the current ini_get value:

 echo ini_get('open_basedir'); 


For example, if open_basedir is defined this way in my php.ini :

 open_basedir = /data/www:/var/www:/home/squale/developpement/tests 

Then the following part of the code:

 var_dump(ini_get('open_basedir')); 

Gets this result:

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

All Articles