1. 创建主程序test.php:基本的表单和通过post提交输入值进行调用对象中的方法,计算出最后的值并输出
<table width="500" align="center" border="0">
<form action="test.php" method="post"><tr>
<td>第一个输入框:</td>
<td><input type='text' name='text1'></td>
</tr>
<tr>
<td>第二个输入框:</td>
<td><input type='text' name='text2'></td>
</tr>
<tr align='center'>
<td colspan='2'><input type='submit' name='sub' value='计算'><td>