分享一个PHP数据流应用的简单例子

前端之家收集整理的这篇文章主要介绍了分享一个PHP数据流应用的简单例子前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

<div class="codetitle"><a style="CURSOR: pointer" data="24564" class="copybut" id="copybut24564" onclick="doCopy('code24564')"> 代码如下:

<div class="codebody" id="code24564">
<?PHP
$count = 5;
start:
if($count < 5) echo "You can try {$count} time,";
echo "Put Password: ";
$handle = fopen ("PHP://stdin","r");
$line = fgets($handle);
if(trim($line) != '123456'){
$count--;
if(!$count) goto error;
goto start;
}
goto success;
error:
echo "Please try after 1 hour! //www.jb51.cc";
goto out;
success:
echo "Logined!";
out:
?>

效果图:

原文链接:https://www.f2er.com/php/27178.html

猜你在找的PHP相关文章