- error_get_last: documentation ( source)
- ini_set: documentation ( source)
- error_reporting: documentation ( source)
- ini_get: documentation ( source)
<?php
function set($value) {
error_reporting(E_ALL);
print("Trying to set $value...");
$before = ini_get("open_basedir");
$result = ini_set('open_basedir', $value);
if ($result) {
print("Success!\n");
} else {
print("Failure\n");
print(error_get_last());
}
print($before." => ".ini_get('open_basedir')."\n");
}
set('/tmp/a'.PATH_SEPARATOR.'/tmp/b/c');
set('/tmp/a/b');
set('/tmp/c');