[PHP] 纯文本查看 复制代码
<?php
header('Content-Type:text/html;charset=utf-8');// 设置页面编码
date_default_timezone_set('PRC');//设置时区为北京时区
//取时间一定要设置一个默认时区,}else{时间格式可能会不正确!
$ju_nianfen = date('Y');
$ju_yuefen = date('m');
$ju_ri=date('d');
$ju_xingqiji = date('w');
echo $ju_nianfen . " - " . $ju_yuefen . " - " . $ju_ri . " - " . $ju_xingqiji."<br>";
//PHP的连接符 是 . 易语言的文本连接 是 + 懂了吧!
$ju_shi = date('H');
$ju_fen = date('i');
$ju_miao = date('s');
echo $ju_shi . ":" . $ju_fen . ":" . $ju_miao;
$ju_xianxingshijian = date('Y-m-d H:i:s');//和易语言一样的取现行时间()
echo "<br>" . $ju_xianxingshijian;
$ju_shi间戳 = time();//取十三位的时间戳
echo "<br>" . $ju_shi间戳;
?>