简单的例子:
echo "请输入一个数字:";
$num = trim(fgets(STDIN));
echo "请再输入一个数字:";
$num1 = trim(fgets(STDIN));
echo "两个数字的和为:",$num + $num1;
简单的例子:
echo "请输入一个数字:";
$num = trim(fgets(STDIN));
echo "请再输入一个数字:";
$num1 = trim(fgets(STDIN));
echo "两个数字的和为:",$num + $num1;