提示成功了,為什么我的面積和周長都是0呢
PHP?Notice:??Use?of?undefined?constant?PI?-?assumed?'PI'?in?index.php?on?line?4 PHP?Notice:??Use?of?undefined?constant?PI?-?assumed?'PI'?in?index.php?on?line?5 面積為:0 周長為:0
PHP?Notice:??Use?of?undefined?constant?PI?-?assumed?'PI'?in?index.php?on?line?4 PHP?Notice:??Use?of?undefined?constant?PI?-?assumed?'PI'?in?index.php?on?line?5 面積為:0 周長為:0
2018-08-29
舉報
2018-08-31
在你第一行加一個? ? define("PI",3.14);
2022-11-23
define("PI",3.14)注意定義的常量名PI兩個單詞都是大寫的,如果PI有一個是小寫就會顯示這個結果。
2021-05-11
define("PI",3.14)注意定義的常量名PI兩個單詞都是大寫的,如果PI有一個是小寫就會顯示這個結果。
2020-02-26
如果你定義的是$PI =3.14,那輸出就應該是: echo “周長是”.$PI*$r*r? ? 以此類推
2018-10-23
$PI =3.14
你是這樣用的吧
2018-08-29
你使用了沒有定義的常數(shù)PI??看看你的代碼定義那