PHP str compare

sec
Article Directory

PHP str compare

字符串与数字比较,其结果总为 真 …

SO

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?php require "flag.php"; 
$input =$_GET['input'];
$input = str_replace(".","", $input);
function check_input($value){
if(strlen($value) > "3")
{
if ($value < "1" && $value > "0.99")
{
if(strlen($value) <= "4"){
return 1;
}
}
}
}

if(check_input($input)){
print("You win! Flag is:".$flag);
} else {
print("Wrong input!");
}
?>

![2f5493ead128fbf1434a7ce058dba03](C:/Users/aja/AppData/Local/Temp/WeChat Files/2f5493ead128fbf1434a7ce058dba03.jpg)

Author: 哒琳

Permalink: http://blog.jieis.cn/2022/b9218f77-2b66-4098-bc22-a591c1d62b57.html

Comments