常量是php脚本中定义的不会改变的值。函数define()用于定义常量。常量一旦被定义,就不能改变,只能通过常量名访问常量,在常量名前没有符号$

 

<?php
define("PI",3.1415926);
print PI;
?>