我們用wordpress系統(tǒng)進(jìn)行網(wǎng)站建設(shè)開(kāi)發(fā)網(wǎng)站時(shí),關(guān)于wordpress的時(shí)間相關(guān)函數(shù)應(yīng)用,以及wp的時(shí)間顯示函數(shù)。
1、輸出 2023-12-25
<?phpthe_time('Y-m-d');?>
2、輸出時(shí)間,如:10:35:28
<?phpthe_time('G:i:s');?>
3、輸出 2023年12月25日
<?phpthe_time('Y年m月d日');?>
4、輸出 2023年12月25日 星期一
<? php the_time ( 'Y年m月d日 l' ) ; ?>
5、輸出完整的日期,如 2023年12月25日 星期一 10:35:28
<? php the_time ( 'Y年m月d日 l G:i:s' ) ; ?>
我們通常會(huì)使用 wordpress 的 the_time() 系統(tǒng)函數(shù)之外,wordpress還有更多的時(shí)間函數(shù),比如?get_the_time() 函數(shù)等。