久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放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時間轉(zhuǎn)換函數(shù)如何使用?

      PHP時間轉(zhuǎn)換函數(shù)如何使用?

      PHP時間轉(zhuǎn)換函數(shù)

      在PHP中時間轉(zhuǎn)換函數(shù)是“strtotime()”,該函數(shù)的作用是將任何英文文本的日期或時間描述解析為Unix時間戳,其語法為“strtotime(time,now)”,該函數(shù)成功則返回時間戳,否則返回FALSE。

      簡單例子

      <?php echo strtotime("now"), "n"; echo strtotime("10 September 2000"), "n"; echo strtotime("+1 day"), "n"; echo strtotime("+1 week"), "n"; echo strtotime("+1 week 2 days 4 hours 2 seconds"), "n"; echo strtotime("next Thursday"), "n"; echo strtotime("last Monday"), "n"; ?>

      失敗檢查

      <?php $str = 'Not Good'; // previous to PHP 5.1.0 you would compare with -1, instead of false if (($timestamp = strtotime($str)) === false) {     echo "The string ($str) is bogus"; } else {     echo "$str == " . date('l dS of F Y h:i:s A', $timestamp); } ?>

      推薦教程:《PHP教程》

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