Recommended PHP Universal Anti-injection program for Windows Tablet PC recommended

Source: Internet
Author: User
Copy the Code code as follows:


function Jk1986_checksql ()
{
$bad _str = "and|select|update|" | Delete|insert|* ";
$bad _array = explode ("|", $bad _STR);
/** Filter Get Parameters **/
foreach ($bad _array as $bad _a)
{
foreach ($_get as $g)
{
if (Substr_count (Strtolower ($g), $bad _a) > 0)
{
echo "";
Exit ();
}
}
}
/** Filter Post Parameters **/
foreach ($bad _array as $bad _a)
{
foreach ($_post as $p)
{
if (Substr_count (Strtolower ($p), $bad _a) > 0)
{
echo "";
Exit ();
}
}
}
/** Filter Cookies parameter **/
foreach ($bad _array as $bad _a)
{
foreach ($_cookie as $co)
{
if (Substr_count (Strtolower ($co), $bad _a) > 0)
{
echo "";
Exit ();
}
}
}
}


Oh like ASP and ASP, the purpose is to let lazy to improve efficiency. 88

The above describes the Windows tablet recommended PHP Universal Anti-injection program recommendations, including the Windows tablet recommended content, I hope to be interested in PHP tutorial friends helpful.

  • 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.