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