久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放AV片

<center id="vfaef"><input id="vfaef"><table id="vfaef"></table></input></center>

    <p id="vfaef"><kbd id="vfaef"></kbd></p>

    
    
    <pre id="vfaef"><u id="vfaef"></u></pre>

      <thead id="vfaef"><input id="vfaef"></input></thead>

    1. 站長資訊網(wǎng)
      最全最豐富的資訊網(wǎng)站

      php中defined()函數(shù)怎么用

      defined()是PHP中的內(nèi)置函數(shù),用于檢查是否存在常量,即是否定義了常量;語法格式“defined(name)”,參數(shù)name是要檢查的常量的名稱。如果常量存在,則返回TRUE,否則返回FALSE。

      php中defined()函數(shù)怎么用

      本教程操作環(huán)境:windows7系統(tǒng)、PHP7.1版,DELL G3電腦

      php defined()函數(shù)

      defined() 函數(shù)檢查常量是否存在。

      語法

      defined(name)

      name:規(guī)定要檢查的常量的名稱,不可省略。

      返回值:如果常量存在,則返回 TRUE,否則返回 FALSE。

      注意:此功能可用于PHP 4.0.0和更高版本。

      示例1:

      <?php  define("constant_key", "value for the constant key");  echo defined("constant_key");  ?>

      輸出:

      php中defined()函數(shù)怎么用

      示例2:定義常數(shù)后檢查條件是否成立。

      <?php  define("constant_key", "value for the constant key");  if(defined("constant_key")){      echo "constant_key is defined";  }else{      echo "constant_key is not defined";  }  ?>

      輸出:

      php中defined()函數(shù)怎么用

      示例3:在沒有定義常量的情況下檢查是否滿足條件。

      <?php  //define("constant_key", "value for the constant key");  if(defined("constant_key")){      echo "constant_key is defined";  }else{      echo "constant_key is not defined";  }  ?>

      輸出:

      php中defined()函數(shù)怎么用

      推薦學習:《PHP視頻教程》

      贊(0)
      分享到: 更多 (0)
      網(wǎng)站地圖   滬ICP備18035694號-2    滬公網(wǎng)安備31011702889846號