警告“不要直接访问超全局 $_POST 数组"在 Netbeans 7.4 for PHP 上 [英] Warning "Do not Access Superglobal $_POST Array Directly" on Netbeans 7.4 for PHP

查看:24
本文介绍了警告“不要直接访问超全局 $_POST 数组"在 Netbeans 7.4 for PHP 上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我使用 $_POST$_GET$_SERVER 时,我在 Netbeans 7.4 for PHP 上收到此消息警告,....

I've got this message warning on Netbeans 7.4 for PHP while I'm using $_POST, $_GET, $_SERVER, ....

不要直接访问超全局 $_POST 数组

Do not Access Superglobal $_POST Array Directly

什么意思?我该怎么做才能更正此警告?

What does it mean? What can I do to correct this warning?

事件示例代码仍显示此警告.

The Event sample code still shows this warning.

推荐答案

filter_input(INPUT_POST, 'var_name') 而不是 $_POST['var_name']
filter_input_array(INPUT_POST) 而不是 $_POST

这篇关于警告“不要直接访问超全局 $_POST 数组"在 Netbeans 7.4 for PHP 上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆