Home  >  Article  >  Backend Development  >  A simple example of PHP data flow application_PHP tutorial

A simple example of PHP data flow application_PHP tutorial

WBOY
WBOYOriginal
2016-07-21 15:16:05940browse

复制代码 代码如下:

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

执行结果:
A simple example of PHP data flow application_PHP tutorial

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/325996.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...
Statement:
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