I downloaded a php program called NetBeans, and I got a warning when I entered the usual ones
$name = $_GET['name'];
:
请不要直接访问超全局$_GET数组 请改用某些过滤函数(例如filter_input() ,带有is_*()函数的条件等)
. I just understand that my usual practice is not standard. In fact, the following form will eliminate the warning:
$name = "";if(is_string($_GET['name'])){$name = strval($_GET['name']);}
Because I use the programming language is miscellaneous, so sometimes do not specifically download special Ide,windows general will be used to show pills, editplus This general-purpose editor, and Mac is more lazy directly with Xcode. But now I feel that NetBeans is really good, helping me to recognize the irregular wording. It seems that we should follow the "工欲善其事, its prerequisite".
The above describes the "do not directly access the super-Global $_get array", including the content of the contents, I hope that the PHP tutorial interested in a friend helpful.