Seite 1 von 1

Überprüfung auf SAFE_MODE

Verfasst: 15.05.2004 21:07
von andreasOymann
Beschreibung: Damit kann man recht schnell prüfen, ob SAFE_MODE auf dem Server ein- oder ausgeschaltet ist

Code: Alles auswählen

<?PHP 
echo "Check for SAFE_MODE: ";
if (ini_get('safe_mode') == '1')
{
	echo "<font color=red>SAFE_MODE ON</font>";
}
else
{
	echo "<font color=green>SAFE_MODE OFF</font>";
}
?> 

Verfasst: 28.05.2006 16:45
von PhilippK
Hier eine etwas ausführlichere Version von phpBB User

Code: Alles auswählen

<?PHP 
echo "PHP-Version: " . phpversion(); 
echo "<br><br>SAFE_MODE is: \n"; 
if (ini_get('safe_mode') == '1') 
{ 
   echo "<font color=red>ON</font>\n"; 
   $status = "<font color=red>Not OK</font>\n"; 
} 
else 
{ 
   echo "<font color=green>OFF</font>\n"; 
   $status = "<font color=green>OK</font>\n"; 
} 
echo "<br>Status: $status<br>"; 

echo "<br>REGISTER_GLOBALS is: \n"; 
if (ini_get('register_globals') == '1') 
{ 
   echo "<font color=red>ON</font>\n"; 
   $status = "<font color=red>Not OK</font>\n"; 
} 
else 
{ 
   echo "<font color=green>OFF</font>\n"; 
   $status = "<font color=green>OK</font>\n"; 
} 
echo "<br>Status: $status<br>"; 

echo "<br>MAGIC_QUOTES_GPC is: \n"; 
if (ini_get('magic_quotes_gpc') == '1') 
{ 
   echo "<font color=green>ON</font>\n"; 
   $status = "<font color=green>OK</font>\n"; 
} 
else 
{ 
   echo "<font color=red>OFF</font>\n"; 
   $status = "<font color=red>Not OK</font>\n"; 
} 

echo "<br>Status: $status<br>"; 
echo "<p><hr>".$_SERVER["SERVER_SIGNATURE"]."</p>"; 
?>