|
<?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! http://www.jb51.NET";
goto out;
success:
echo "Logined!";
out:
?>
效果图:
php技术:分享一个PHP数据流应用的简单例子,转载需保留来源!
郑重声明:本文版权归原作者所有,转载文章仅为传播更多信息之目的,如作者信息标记有误,请第一时间联系我们修改或删除,多谢。