How is this possible???? (addslashes)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Can anyone please tell me how the addslashes output ("note = Everyone''s a
card on the \earth") in the following example is possible. It is
"addslashes" output but this result is consistent with the output from
"post" when runtime is set: 1): a single quote is inserted before a single
quote and nothing is added before " or \.

php: ...
-------------------------------------------
<?php
//error_reporting(E_ALL);
echo 'display_errors = ' . ini_get('display_errors') . "<br>";
echo 'register_globals = ' . ini_get('register_globals') . "<br>";
echo 'magic_quotes_gpc = ' . ini_get('magic_quotes_gpc') . "<br>";
echo 'get_magic_quotes_gpc = ' . get_magic_quotes_gpc() . "<br>";
echo 'get_magic_quotes_runtime = ' . get_magic_quotes_runtime() . "<br>";
echo "<br><br>";
echo "<br>";
echo 'Current PHP version: ' . phpversion();
echo "<br><br>";
?>

<?php
$note = "Everyone's a card on the \earth";
echo "<br>$note<br>";
$note = addslashes($note);
echo "<br>note = $note<br>";
?>

<?php
phpinfo();
?>
-------------------------------------------------

output:
------------------------------------------------
display_errors = 1
register_globals = 1
magic_quotes_gpc = 1
get_magic_quotes_gpc = 1
get_magic_quotes_runtime = 1



Current PHP version: 4.4.4


Everyone's a card on the \earth

note = Everyone''s a card on the \earth

Warning: phpinfo() has been disabled for security reasons in
-----------------------------------------------------------------------------------
--
Using Opera's revolutionary email client: http://www.opera.com/mail/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux