Home > php教程 > php手册 > 分享一个PHP数据流应用的简单例子

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

WBOY
Release: 2016-06-06 20:40:36
Original
1320 people have browsed it

分享一个PHP数据流应用的简单例子,需要的朋友可以参考下

代码如下:
$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:
?>

效果图:
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template