12 12
發新話題

[分享] 《分享》 PHP 『日期與時間函式庫』

《分享》 PHP 『日期與時間函式庫』time --- 傳回目前UNIX時間戳記

time

(PHP3 , PHP4)

time ---  傳回目前UNIX時間戳記

語法 : int time(void);

說明 :

傳回從Unix時期(January 1 1970 00:00:00 GMT)到現在的總秒數。

參考 : date( )


TOP

《PHP》 『日期與時間函式庫』strtotime - 剖析任何英文的日期時間成為UNIX時間戳記

strtotime

(PHP3 >= 3.0.12 , PHP4 >= 4.0b2)

strtotime ---  剖析任何英文的日期時間成為UNIX時間戳記

語法 : int strtotime (string time [, int now])

說明 :

給予此函式一包含英文日期格式的字串,將會試著去剖析此字串成為UNIX時間戳記

Example :

<?php

   echo strtotime ("10 march 2000") . "\n";

?>

TOP

 12 12
發新話題

本站所有圖文均屬網友發表,僅代表作者的觀點與本站無關,如有侵權請通知版主會盡快刪除。