我這樣做了,但當我試圖在Internet Explorer上查看它時,我看不到PHP部分。計算一個圓
這是我做的代碼:
<html>
<head><title>Practise</title></head>
<body>
<form method="post">
Circumference of a Circle or the Area: <br>
The Radius of the circle: <input type="text" name="radius"><br>
<input type="submit" value="Submit">
<?php
$rad = (float) $_POST['radius'];
$cir = $rad * 2 * pi();
$area = pow($rad, 2) * pi();
echo "The circumference of the circle is:" $cir.;
echo "The area of the circle is:" $area.;
?>
</body>
</html>
請註明了錯誤的代碼。謝謝!
@Edo:請編輯您的問題,粘貼真正的代碼,選擇它,然後在編輯器中點擊「{}」按鈕。它會產生可讀的代碼和html。 – Mat 2011-05-19 06:23:50