is_safe_mode function for PHP
Sunday July 16th, 2006
The following function will return TRUE if the server is running PHP in safe mode. It uses the function ini_get, which may be disabled. If ini_get is disabled then the function also returns TRUE since the assumption that any server disabling functions would probably also be running in safe mode.
PHP:
-
function is_safe_mode()
-
/* Returns true if PHP is in safe_mode. Defaults to 'true' because
-
this will use ini_get which may be disabled. If ini_get is disabled
-
then we are probably in safe_mode */
-
{
-
$retval = true;
-
-
{
-
{
-
$retval = true;
-
}
-
else
-
{
-
$retval = false;
-
}
-
}
-
else
-
{
-
$retval = true;
-
}
-
-
return $retval;
-
}



