About the escape function get_magic_quotes_gpc not clear, confidential. Workaround

Source: Internet
Author: User
About the escape function get_magic_quotes_gpc not clear, confidential.


Can roughly understand GET....._GPC this function,
Generally can understand addslashes, is the function = =.

Array_walk saw a few articles, Mengmengdongdong,

1) can shallow into shallow out of the next array_walk role?
2) What does the code described in the picture mean roughly?
3) can I replace no with the following statement?
if (!GET_MAGIC_QUOTES_GPC ())
{
Addslashes ($prot);
}

------Solution--------------------
1) the Array_walk () function applies a callback function to each element in the array. Returns TRUE if successful, otherwise FALSE.

2) is actually anti-SQL injection, add backslashes to the predefined characters in the value get/post.

3) cannot
------Solution--------------------
1. The same upstairs

2. There is no more addslashes, no need to open the magic, before the storage filter

3.array_walk () filter your post and get array all over again, why change?
------Solution--------------------
PHP 5.4 has removed this ini parameter, unified, you do not tangle, all press 5.4 after the way to do it, or later upgrade to rewrite the code
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.