test.php
Wenn ich jetzt "hallo ' hallo" eingebe, bekomme ich folgende Ausgabe
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?
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?