get php 怎么用,php getdate函数怎么用
php getdate()函數用于返回當前本地的日期/時間的日期/時間信息,語法為getdate(timestamp)。該函數會返回帶有與時間戳相關的信息的關聯數組。
作用:返回當前本地的日期/時間的日期/時間信息
語法:
getdate(timestamp)
參數:
timestamp 可選。規定 Unix 時間戳,整數值。默認為當前本地時間(time())。
說明:返回帶有與時間戳相關的信息的關聯數組:[seconds] – 秒,[minutes] – 分,[hours] – 小時,[mday] – 一個月中的第幾天,[wday] – 一周中的某天,[mon] – 月,[year] – 年,[yday] – 一年中的某天,[weekday] – 星期幾的名稱,[month] – 月份的名稱,[0] – 自 Unix 紀元以來經過的秒數。
php getdate()函數 示例:
print_r(getdate(1524123066));
?>
輸出:
Array ( [seconds] => 6 [minutes] => 31 [hours] => 15 [mday] => 19 [wday] => 4 [mon] => 4 [year] => 2018 [yday] => 108 [weekday] => Thursday [month] => April [0] => 1524123066 )
本篇文章就是關于getdate()函數的使用方法介紹,希望對需要的朋友有所幫助!
總結
以上是生活随笔為你收集整理的get php 怎么用,php getdate函数怎么用的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: linux安装多版本php_Linux系
- 下一篇: Java读取模板文件您好,RtfTemp