Escape user-passed variables from ecshop.
/* Escape the input variables. */If (! Get_magic_quotes_gpc () {if (! Empty ($ _ GET) {$ _ GET = addslashes_deep ($ _ GET);} if (! Empty ($ _ POST) {$ _ POST = addslashes_deep ($ _ POST);} $ _ COOKIE = addslashes_deep ($ _ COOKIE ); $ _ REQUEST = addslashes_deep ($ _ REQUEST);}/* escape special characters in the variable in recursive mode */function addslashes_deep ($ value) {return empty ($ value )? $ Value: is_array ($ value )? Array_map ('addslashes _ deep ', $ value): addslashes ($ value );}
Articles you may be interested in
- How PHP serializes variables is better than php's four serialization Methods
- Jump to the corresponding Email homepage Based on the Email entered by the user
- How to check MySQL startup time and running time
- Image zoom-in display special effects slimbox the most lightweight function the most powerful Jquery Image zoom-in special effects
- Powerful PHP image processing class (watermark, transparency, zoom, sharpen, rotate, flip, cut, reversed)
- Use php functions in the smarty template and how to use multiple functions for a variable in the smarty Template
- Use the GZip compression function of PHP to compress website JS and CSS files to accelerate Website access.
- How does php determine whether the current operating system is linux or windows?