超越PHP PHP动态 | 经典文章 | CLASS | 相关下载 | 常见问题 | FORUM | WIKI | 在线手册
Site search:    
<strtotimedBase>
Last updated: Fri, 22 Jun 2007

time

(PHP 3, PHP 4 , PHP 5)

time -- 返回当前的 UNIX 时间戳

说明

int time ( void )

返回自从 Unix 新纪元(格林威治时间 1970 年 1 月 1 日 00:00:00)到当前时间的秒数。

参见 date()




add a note add a note User Contributed Notes
time
08-Sep-2000 03:42
To convert a MySQL timestamp to a Unix-style timestamp, use MySQL's UNIX_TIMESTAMP function.

For Example:
$result=mysql_query ("SELECT UNIX_TIMESTAMP(timestamp_column) as epoch_time FROM table");

$unix_timestamp = mysql_result ($result, 0, 0);

<strtotimedBase>
 Last updated: Fri, 22 Jun 2007
view source | feedback | send page | sitemap | aboutus   
Copyright ® 2002-2003 PHPE.NET. All rights reserved
Last updated:2002-11-22