<?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!";
goto out;
success:
echo "Logined!";
out:
?>
PHP数据流应用的一个简单实例
内容版权声明:除非注明,否则皆为本站原创文章。
转载注明出处:http://www.heiqu.com/4e755718c76f667183a12432a94957cd.html