Phpaddslashes recursively implements the method of referencing strings by backslash
This article introduces how php uses recursion to reference strings using backslash. it is an example to help you understand it. Php addslashes recursive backslash reference string, the code is as follows:
'"; $ _ GET ['str1'] = 'fanglor" is \ a boy>'; echo 'current get_magic_quotes_gpc is'. get_magic_quotes_gpc (); echo" "; // Determine whether the current get_magic_quotes_gpc is enabled // by bbs. it-home.orgif (! Get_magic_quotes_gpc () {$ _ POST = addslashes_deep ($ _ POST); $ _ GET = addslashes_deep ($ _ GET); $ _ COOKIE = addslashes_deep ($ _ COOKIE );} // print the result var_dump ($ _ POST); echo" "; Var_dump ($ _ GET);?> Print result: The current get_magic_quotes_gpc is 0 array (1) {["STR"] => string (30) "\ 'fanglor \ 'is \ a boy> \'"} array (1) {["STR1"] => string (26) "fanglor \" is \ a boy> "} |