search

Home  >  Q&A  >  body text

获取当前日期除了上面的方法,还可以怎么写?

<?php
	$t = time();
	echo date('Y-m-d H:i:s',$t);
?>


小天小天2888 days ago972

reply all(2)I'll reply

  • 数据分析师

    数据分析师2017-09-30 22:46:38

    In addition to the above method, how else can you write the current date? -PHP Chinese website Q&A-In addition to the above method, how else can you write to get the current date? -PHP Chinese website Q&A

    Please watch and learn.

    reply
    0
  • 迷茫

    迷茫2016-12-17 14:13:47

    也可以这样写

    <?php
        echo date('Y-m-d H:i:s',time()) ;
    ?>


    reply
    1
  • Cancelreply