Home  >  Article  >  Backend Development  >  PHP调用date函数时出现的一个有关问题

PHP调用date函数时出现的一个有关问题

WBOY
WBOYOriginal
2016-06-13 13:26:15822browse

PHP调用date函数时出现的一个问题
echo"

Order processed at"
echo date('H:i,jS F Y');
echo"

";
?>
这是照书打的,为什么是错误的呢

------解决方案--------------------
date_default_timezone_set('PRC');

------解决方案--------------------
要输出日期时间么?

echo date('Y-m-d H:i:s');
------解决方案--------------------
楼上正解。
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn