php Hidden fields are invisible elements used to collect or send information. For visitors to the page, hidden fields are invisible. When the form is submitted, the hidden field will send information to the server with the name and value defined during setup.
Hidden fields:
Hidden fields are invisible elements used to collect or send information. For visitors to the web page, they are hidden Domains are invisible. When the form is submitted, the hidden field will send information to the server with the name and value you defined when setting it up.
(Recommended tutorial: java video tutorial)
aaa.html file:
<form method='post' action="bbb.php" name="theForm" enctype="multipart/form-data" οnsubmit="return validate()">//跳转到bbb.php文件中 <input type="submit" class="button" value="OK!!"/> <input type="hidden" name="ceshi" value="E:/wamp/www/yincangyu/hi.txt"/>//创建隐藏域并引入隐藏的值(type值为hidden) </form> bbb.php文件: <?php echo $_POST['ceshi'];//输出运行后的结果 @unlink($_POST['ceshi']);//在其他文件中删除某个XX
Advantages of hidden domains:
1 , does not require any server resources.
2. Wide support, any client supports hidden domains.
3. The implementation is simple. The hidden field belongs to HTML control and does not require programming knowledge like server control.
Disadvantages of hidden domains:
1. It has high security risks.
2. The storage structure is simple.
3. If more large values are stored, it will cause performance problems.
4. If there are too many hidden domains, they will be banned in some clients.
5. Hidden fields store data on the server, not on the client.
Note: If the page has too many hidden fields during development, these hidden fields will be stored on the server. When the client browses the page, some firewalls will scan the page to ensure the security of the operating system. If the page has too many hidden fields, these firewalls may prohibit certain functions of the page.
Related recommendations: php training
The above is the detailed content of What is php hidden domain. For more information, please follow other related articles on the PHP Chinese website!