index.php
- PHP code
计算
周长面积计算
正方形 ||
三角形 ||
圆形
form.class.php
- PHP code
shape=isset($_REQUEST["id"]) ? $_REQUEST["id"]:"rect";
}
function __toString(){
$form='';
return $form;
}
private function getRect(){
$input='请输入矩形的宽高
';
$input.='宽度:
';
$input.='高度:
';
return $input;
}
private function getTriangle(){
$input='请输入三角形的三边
';
$input.='第一边:
';
$input.='第二边:
';
$input.='第三边:
';
return $input;
}
private function getCircle(){
$input='请输入圆的半径
';
$input.='半径:
';
return $input;
}
}
?>
--------------------
点三角形的时候,为什么会输出‘没有这个图形’,那里写错了?
------解决方案--------------------
id=triangle
case "Triangle":
=====================
understand??