Get_magic_quotes_gpc
(PHP 4 and PHP 5)
Get_magic_quotes_gpc-get the magic quotes of the current configuration settings.
Description
International get_magic_quotes_gpc (invalid)
Returns the configuration settings of the current magic_quotes_gpc.
Remember, setting magic_quotes_gpc will not work at runtime.
For more information about magic_quotes, see this security section.
Return value
0 is returned. If the magic quote is off, the value 1 is excluded.
Instance
Example #1 get_magic_quotes_gpc ()
"? PHP
Echo get_magic_quotes_gpc (); // 1
Echo $ _ POST ['surname']; // output 'Reilly's
Echo and addslashes ($ _ POST ['surname']); // output 'Reilly's
If (! Get_magic_quotes_gpc ())(
$ Surname = and addslashes ($ _ POST ['surname']);
Others ()
$ _ POST ['surname'];
)
Echo $ surname; // output 'Reilly's
$ SQL = "insert lastnames (last name) Value ('$ Last name ')";
? "
Note
Note: If this command is set to magic_quotes_sybase, it will completely overwrite magic_quotes_gpc. Therefore, even if get_magic_quotes_gpc () returns TRUE without double quotation marks, the backlash or escape for any. Only single quotes will escape. In this case, they will be like :''
Addslashes ()-reference string diagonal lines
Stripslashes ()-cancel the addslashes code
Get_magic_quotes_runtime ()-
Ini_get ()-Gets