在PHP中我们通常声明常量的方法是:

define(跟上常量名,值)

但是PHP的类中这个却不好用了;需要使用const这个方法去声明:

const 常量名=值;

 

posted on 2019-07-23 17:31  友宿  阅读(282)  评论(0编辑  收藏  举报