当前位置:Gxlcms > php框架 > 分享一个PHP数据流应用的简单例子

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

时间:2021-07-01 10:21:17 帮助过:34人阅读

代码如下:

<?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.gxlcms.com";
goto out;
success:
echo "Logined!";
out:
?>

效果图:

人气教程排行