条件PHP代码不接受值



我有以下PHP代码,这些代码在条件部分似乎无法正常工作。我能够正确地从用户那里获得三角形三条边的输入,但IF语句并没有做它应该做的事情——有什么想法吗??

<?php
echo "Thank you for the input.  ";
echo "You entered in the following values: ".$_GET["firstSide"].", ".$_GET["secondSide"],", and ".$_GET["thirdSide"]." "; 

$int_firstSide = @$_GET["firstSide"];
$int_secondSide = @$_GET["secondSide"];
$int_thirdSide = @$_GET["thirdSide"];
$oneAndtwo = $int_firstSide + $int_secondSide;
$oneAndthree = $int_firstSide + $int_thirdSide;
$twoAndthree = $int_secondSide + $int_thirdSide;
if((($oneAndtwo) > ($int_thirdSide)) || (($oneAndthree) > ($int_secondSide)) || (($twoAndthree) > ($int_firstSide)))
{
echo "  Based on the entered values, you indeed have a Triangle...";
} else {
echo "You do not have a valid Triangle...Sorry...have a nice day and thanks for playing!";
}

?>

通过将上面的或替换为和,使其正常工作。

最新更新