In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
Editor to share with you the example analysis of PHP data submission and filtering, I believe that most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
The details are as follows:
1. Basic principles of filtering php submission data
1) when submitting variables to the database, we have to use addslashes () to filter, like our injection problem, an addslashes () is done. In fact, when it comes to variable values, the intval () function is also a good choice for string filtering.
2) Open magic_quotes_gpc and magic_quotes_runtime in php.ini. Magic_quotes_gpc can change quotation marks in get,post,cookie to slashes.
Magic_quotes_runtime can act as a format for data going in and out of the database. In fact, this parameter was very popular as early as when the injection was crazy.
3) when using system functions, you must use escapeshellarg (), escapeshellcmd () parameters to filter, so that you can rest assured to use system functions.
4) for cross-site, both strip_tags () and htmlspecialchars () parameters are good, and tags submitted by users with html and php will be converted. Like angle brackets. "
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.