-3
我需要一些幫助與此應用程序從日誌應用程序中脫落
我無法得到正確的輸出。幫助將不勝感激
所以到目前爲止我的代碼是
<html>
<head>
</head>
<body>
<form action="" method="POST">
<input type="submit" name="step" value="take step">
</form>
<?php
$step = 0;
function mybutton() {
}
if(array_key_exists('step',$_POST)) {
$x = rand(0,1);
mybutton()
if($x == 1) {
GLOBAL['step'] = (GLOBAL['step'] + $x);
echo"you took a step forwards" .$step;
} else {
GLOBAL['step'] = (GLOBAL['step'] - $x);
echo"you took a step backwards" .$step;
}
}
?>
</body>
</html>
你缺少一個;在mybutton()之後,我想是$ GLOBALS你試圖調用的 –