1. 程式人生 > >PHP中常量的定義

PHP中常量的定義

常量定義的方法:

第一種方式:

<?php
$p = "PII";
define("PI", 3.14);
define($p, 3.14);
echo PI;
echo "<br />";
echo PII;
?>