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

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

程序员文章站 2022-03-24 17:03:53
...
1 2 $count = 5;
3 start:
4 if($count 5 echo "Put Password: ";
6 $handle = fopen ("php://stdin","r");
7 $line = fgets($handle);
8 if(trim($line) != '123456'){
9 $count--;
10 if(!$count) goto error;
11 goto start;
12 }
13 goto success;
14 error:
15 echo "Please try after 1 hour! http://www.fanlishuqian.com";
16 goto out;
17 success:
18 echo "Logined!";
19 out:
20 ?>
执行结果:

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


摘自 专注web技术

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/478181.htmlTechArticle1 ?php 2 $count = 5; 3 start: 4 if($count 5) echo You can try {$count} time, ; 5 echo Put Password: ; 6 $handle = fopen (php://stdin,r); 7 $line = fgets($handle); 8 if(trim($line)...