How do I get the current date and time in PHP?

后端 未结 30 2429
孤城傲影
孤城傲影 2020-11-22 08:19

Which PHP function can return the current date/time?

30条回答
  •  说谎
    说谎 (楼主)
    2020-11-22 09:08

    You can use this format also:

    $date = date("d-m-Y");
    

    Or

    $date = date("Y-m-d H:i:s");
    

提交回复
热议问题