English 中文(简体)
PHP过滤器_has_var v. food?
原标题:PHP filter_has_var vs empty?
  • 时间:2012-01-12 22:14:03
  •  标签:
  • php
  • isset

i 知道空洞的速率在当时正在下降,但过滤器_has_var的速率(在所写的网址上)如此之快的空洞或过滤器_has_var?

最佳回答

<http://php.net/filter_has_var” rel=“noreferer”>filter_has_var( 如果出于某种原因对超级全球化进行净化,则可能有用,因为超级全球对原始投入数据进行核对,而不是从_GET、_POST、_ETC美元购买。

例如:

$_GET["injected"] = 123;

var_dump( filter_has_var(INPUT_GET, "injected") );   // false

// or the other way round

While you can overwrite the variable, the filter extension accesses a separate copy. And INPUT_GET will not alias to the $_GET superglobal.

Apart from that another reason is to use it for unification. If you use filter_var extensively, than a ruleset would be more fond of using filter_has_var() over isset().

但是,由于任何令人难以置信的业绩原因,不能使用一种或另一种。

问题回答

filter_has_var and empty are two totally different functions that do totally different things. You would not want to swap the use of these two functions.

www.un.org/Depts/DGACM/index_spanish.htm 简单检查了PHP超级全球化中的一个:$_GET,$_POST/code>,$_SERVER/code>,$_ENV or $_COOKIE,以确保一个变量随请求而通过。 如果var空的话,这一职能仍将是真实的。





相关问题
Brute-force/DoS prevention in PHP [closed]

I am trying to write a script to prevent brute-force login attempts in a website I m building. The logic goes something like this: User sends login information. Check if username and password is ...

please can anyone check this while loop and if condition

<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...

定值美元

如何确认来自正确来源的数字。

Generating a drop down list of timezones with PHP

Most sites need some way to show the dates on the site in the users preferred timezone. Below are two lists that I found and then one method using the built in PHP DateTime class in PHP 5. I need ...

Text as watermarking in PHP

I want to create text as a watermark for an image. the water mark should have the following properties front: Impact color: white opacity: 31% Font style: regular, bold Bevel and Emboss size: 30 ...

How does php cast boolean variables?

How does php cast boolean variables? I was trying to save a boolean value to an array: $result["Users"]["is_login"] = true; but when I use debug the is_login value is blank. and when I do ...