constant() 函數(shù)返回常量的值。
constant(constant)
參數(shù) | 描述 |
---|---|
constant | 必需。規(guī)定要檢查的常量的名稱。 |
注釋:該函數(shù)僅適用于 class 常量。
<?php
//定義一個(gè)常量
define("GREETING","Hello world!");
echo constant("GREETING")
;
?>
輸出:
Hello world!
如對(duì)本文有疑問,請(qǐng)?zhí)峤坏浇涣髡搲瑥V大熱心網(wǎng)友會(huì)為你解答?。?點(diǎn)擊進(jìn)入論壇
Powered by 365建站網(wǎng) RSS地圖 HTML地圖
copyright © 2013-2024 版權(quán)所有 鄂ICP備17013400號(hào)