PHP数据流应用的一个简单实例_PHP教程
程序员文章站
2024-01-23 10:36:52
...
复制代码 代码如下:
$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!";
goto out;
success:
echo "Logined!";
out:
?>
执行结果:
上一篇: php透明水印生成
推荐阅读