[php] magic quotes runtime nicht wirklich aus!

test.php
Code:
<?php
if (!empty($_POST['bla']))
{
	echo (get_magic_quotes_runtime() == 0) ? 'magic quotes runtime ist auf aus' : 'magic quotes runtime ist auf ein';
	echo "\n<br />";
	echo $_POST['bla'];
	exit;
}
?>

<form action="test.php" method="post">
<input type="text" name="bla" />
</form>

Wenn ich jetzt "hallo ' hallo" eingebe, bekomme ich folgende Ausgabe
magic quotes runtime ist auf aus
hallo \' hallo

Irgendwas setzt bei den globalen Variablen
Backslashes vor die single quotes, obwohl das script
ja meint, magic guotes runtime wäre auf aus!?
Ich brauch nähmlich eine Funktion wie addslashes, die nur
addslasht, wenn magic quotes runtime aus ist und den
parameter ansonsten so zurückgibt wie er war.

Ist das ein Fehler in XAMPP oder ist das schon richtig so?
 
Für dich ist nicht magic_quotes_runtime interessant, sondern magic_quotes_gpc, da magic_quotes_gpc die Daten in GET, POST, REQUEST, COOKIE und FILES regelt.
 
Zurück
Oben