'Please do not access the superglobal $_GET array directly'
Jul 29, 2016 am 09:13 AMI downloaded an IDE called NetBeans to develop a PHP program. When I entered the commonly used $name = $_GET['name'];
, I received a warning: Please do not directly access the super-global $_GET array. Please change it. Use some filtering functions (such as filter_input(), conditions with is_*() functions, etc.)
. Only then did I realize that my usual approach was not standardized. In fact, the warning can be eliminated by changing it to the following form:
<code>$name = ""; if(is_string($_GET['name'])){ $name = strval($_GET['name']); }</code>
Since the programming language I use is relatively complicated, sometimes I don’t download a special IDE. For windows, I usually just use Hidemaru and Editplus. type editor; while Mac is more lazy and uses Xcode directly. But now I feel that NetBeans is really good, and it helped me realize this irregular writing method. It seems that in the future we should follow the saying "If a worker wants to do his job well, he must first sharpen his tools."
The above introduces "Please do not directly access the super-global $_GET array", including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.

Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

How to automate tasks using PowerShell

Java Error: NetBeans Error, How to Solve and Avoid

How does java initiate an http request and call the post and get interfaces?

How to change Ubuntu's apt-get update source?

In-depth analysis of the similarities and differences between the get method and post method in jQuery
