php date转换时间戳的方法:首先创建PHP示例文件;然后通过“echo strtotime("now"), "\n";”方法将date转换时间戳即可。

推荐:《PHP视频教程》
使用strotime函数,代码如下;

扩展资料:
立即学习“PHP免费学习笔记(深入)”;
PHP strtotime() 函数
1.strtotime,可以将美国英语格式时间字符串转换的函数。
2.strtotime()可以用英语的自然语言创建某个时刻的时间戳
3.函数语法:int strtotime(string $time[,int $now])
4.函数作用:将美国英语格式的日期时间字符串转换成unix时间戳。











