久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放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. 站長(zhǎng)資訊網(wǎng)
      最全最豐富的資訊網(wǎng)站

      php中怎么將時(shí)間轉(zhuǎn)換為時(shí)間戳

      php中怎么將時(shí)間轉(zhuǎn)換為時(shí)間戳

      PHP 提供了函數(shù)可以方便的將各種形式的日期轉(zhuǎn)換為時(shí)間戳,該類(lèi)函數(shù)主要是:

      strtotime():將任何英文文本的日期時(shí)間描述解析為時(shí)間戳。

      mktime():從日期取得時(shí)間戳。

      strtotime()

      strtotime() 函數(shù)用于將英文文本字符串表示的日期轉(zhuǎn)換為時(shí)間戳,為 date() 的反函數(shù),成功返回時(shí)間戳,否則返回 FALSE 。

      語(yǔ)法:

      int strtotime ( string time [, int now] )

      示例:

      <?php echo strtotime("2009-10-21 16:00:10"); //輸出 1256112010 echo strtotime("10 September 2008"); //輸出 1220976000 echo strtotime("+1 day"), "<br />"; //輸出明天此時(shí)的時(shí)間戳 ?>

      mktime()

      mktime() 函數(shù)用于從日期取得時(shí)間戳,成功返回時(shí)間戳,否則返回 FALSE 。

      語(yǔ)法:

      int mktime(時(shí), 分, 秒, 月, 日, 年)

      示例:

      <?php echo mktime(21, 50, 55, 07, 14, 2010); //輸出“1279115455” ?>

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