如题,源码如下
简易计算器
$num1 = $_GET["num1"];
$num2 = $_GET["num2"];
if($_GET["ysf"]==" ")
$sun = $num1 $num2;
if($_GET["ysf"]=="-")
$sun = $num1-$num2;
if($_GET["ysf"]=="*")
$sun = $num1*$num2;
if($_GET["ysf"]=="/")
$sun = $num1/$num2;
?>
if(isset($_GET["sub"]))
echo $sun;
?>
There is no problem after reading the code. The final output is
Look at what the error is