欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  后端开发

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

程序员文章站 2022-04-10 20:23:53
...
复制代码 代码如下:

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

效果图:
分享一个PHP数据流应用的简单例子_PHP教程

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/325419.htmlTechArticle复制代码 代码如下: ?php $count = 5; start: if($count 5) echo "You can try {$count} time, "; echo "Put Password: "; $handle = fopen ("php://stdin","r"); $line = fgets($handl...