当前位置:主页 > 软件编程 > PHP代码 >

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

时间:2020-10-23 13:03:26 | 栏目:PHP代码 | 点击:

复制代码 代码如下:

<?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! https://www.jb51.net";
goto out;
success:
echo "Logined!";
out:
?>

效果图:

您可能感兴趣的文章:

相关文章