PHP浮点精确度,问鼎杯2017,代码还原

编程入门 行业动态 更新时间:2024-10-09 06:21:37

PHP<a href=https://www.elefans.com/category/jswz/34/1705038.html style=浮点精确度,问鼎杯2017,代码还原"/>

PHP浮点精确度,问鼎杯2017,代码还原

题目描述:

用PHP本地实现以上网页背后的代码
环境:wampsever
代码

<?php
$flag="falg={something secret}";
echo "Can you tell me what year is this?<br>";
if(isset($_GET['year'])){$year=$_GET['year'];#echo $year;if($_GET['year']==='2017'){echo "Yes this year is 2017, but you can't input 7 in fact.";die();}elseif(strpos($_GET['year'],'0x')!==false){echo "Oh,I forgot to tell you that you can't input like 0x...or 0b...or...";die();#强制退出}elseif(strpos($_GET['year'],'0b')!==false){echo "Oh,I forgot to tell you that you can't input like 0x...or 0b...or...";die();#强制退出}elseif((float)$_GET['year']==2017){#echo '<br>';#echo gettype((float)$_GET['year']);#echo '<br>';#echo gettype(2017);#echo '<br>';echo "Congratulations";echo '<br>';echo "$flag";#echo (float)$_GET['year'];}else{echo "error";}}
else{echo "Year is not True!";
}?>

运行截图:

更多推荐

PHP浮点精确度,问鼎杯2017,代码还原

本文发布于:2024-03-23 01:52:12,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1739054.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:浮点   精确度   代码   PHP

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!