分享一个PHP数据流应用的简单例子_PHP
程序员文章站
2022-05-12 09:47:33
...
复制代码 代码如下:
$count = 5;
start:
if($count 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.bitsCN.com";
goto out;
success:
echo "Logined!";
out:
?>
效果图:
$count = 5;
start:
if($count 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.bitsCN.com";
goto out;
success:
echo "Logined!";
out:
?>
效果图:
上一篇: Yii操作数据库实现动态获取表名的方法,yii数据库
下一篇: 在Java中获取环境变量