久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放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)unix時間

      在php中可以通過strtotime函數(shù)將任何英文文本的日期或時間描述解析為Unix時間戳,其轉(zhuǎn)換語法如“strtotime(time,now);”。

      php怎么將時間轉(zhuǎn)unix時間

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

      php怎么時間轉(zhuǎn)unix時間?

      strtotime() 函數(shù)將任何英文文本的日期或時間描述解析為 Unix 時間戳(自 January 1 1970 00:00:00 GMT 起的秒數(shù))。

      注意:如果年份表示使用兩位數(shù)格式,則值 0-69 會映射為 2000-2069,值 70-100 會映射為 1970-2000。

      注意:請注意 m/d/y 或 d-m-y 格式的日期,如果分隔符是斜線(/),則使用美洲的 m/d/y 格式。如果分隔符是橫杠(-)或者點(.),則使用歐洲的 d-m-y 格式。為了避免潛在的錯誤,您應該盡可能使用 YYYY-MM-DD 格式或者使用 date_create_from_format() 函數(shù)。

      語法

      strtotime(time,now);

      參數(shù)

      time 必需。規(guī)定日期/時間字符串。

      now 可選。規(guī)定用來計算返回值的時間戳。如果省略該參數(shù),則使用當前時間。

      實例

      將英文文本日期時間解析為 Unix 時間戳:

      <?php echo(strtotime("now") . "<br>"); echo(strtotime("15 October 1980") . "<br>"); echo(strtotime("+5 hours") . "<br>"); echo(strtotime("+1 week") . "<br>"); echo(strtotime("+1 week 3 days 7 hours 5 seconds") . "<br>"); echo(strtotime("next Monday") . "<br>"); echo(strtotime("last Sunday")); ?>

      運行結(jié)果:

      1624501247 1473004800 1624519247 1625106047 1625390452 1624809600 1624118400

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

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