1

how to code a PHP function who will check whether the mode of Apache is on safemode or not ?

justjoe
  • 5,454
  • 9
  • 44
  • 64

2 Answers2

4
<?php 
// Check for safe mode
if( ini_get('safe_mode') ){
    // Do it the safe mode way
}else{
    // Do it the regular way
}

?>

http://www.php.net/manual/en/features.safe-mode.php#45263

Silver Light
  • 44,202
  • 36
  • 123
  • 164
3

Apache doesn't have a safemode, Do you mean PHP?

$safemode = ini_get('safe_mode');
JonnyLitt
  • 763
  • 6
  • 11