零零乙 2009-01-22 20:09 采纳率: 33.3%
浏览 812

如何在 PHP 中获取当前的日期和时间?

Which PHP function can return the current date/time?

转载于:https://stackoverflow.com/questions/470617/how-to-get-the-current-date-and-time-in-php

  • 写回答

30条回答 默认 最新

  • MAO-EYE 2009-01-22 20:11
    关注

    You can either use the $_SERVER['REQUEST_TIME'] variable (available since PHP 5.1.0) or the time() function to get the current Unix timestamp.

    评论

报告相同问题?

悬赏问题

  • ¥15 MCNP里如何定义多个源?
  • ¥20 双层网络上信息-疾病传播
  • ¥50 paddlepaddle pinn
  • ¥20 idea运行测试代码报错问题
  • ¥15 网络监控:网络故障告警通知
  • ¥15 django项目运行报编码错误
  • ¥15 请问这个是什么意思?
  • ¥15 STM32驱动继电器
  • ¥15 Windows server update services
  • ¥15 关于#c语言#的问题:我现在在做一个墨水屏设计,2.9英寸的小屏怎么换4.2英寸大屏