index.php内容:
$smarty->assign('name',strtotime('-0'));
$smarty->display("index.html");
index.html内容:
{$name|date_format:'%Y-%m-%d'}<hr>
{$smarty.now|date_format:'%Y-%m-%d'}<hr>
为什么两个到日期不一样?一个是2010-02-09一个是2010-02-08
实际日期是2010-02-08才对的
$smarty->assign('name',strtotime('-0'));
$smarty->display("index.html");
index.html内容:
{$name|date_format:'%Y-%m-%d'}<hr>
{$smarty.now|date_format:'%Y-%m-%d'}<hr>
为什么两个到日期不一样?一个是2010-02-09一个是2010-02-08
实际日期是2010-02-08才对的
解决方案 »
- 求助关于TinyEditor编辑器传值的问题。
- ajax传输数据的方式
- PHP表状树状显示
- 我出现了一个内存不够的问题
- 请问:怎样用PHP把文件存到mysql数据库中BLOB字段
- 为什么在其它的页面不能用session(同一个浏览器窗口中)
- for循环为什么不能自减,只有自加,我写的代码是 for ($t=10;$t>=0;$t--){echo "ddddddd";}为什么不能运行。请入指教
- _-_-_-_-_-phphelp任务表(测试版继续下载)_-_-_-_-_-
- php中{$a}和$a的区别是什么?
- php 的error_reporting 不论 什么错误都中断程序执行怎么设置
- 有没有绿色免安装的PHP开发环境啊?
- 急!!!!Smarty问题,表单无法传递参数。
不太了解你这个strtotime('-0');的用意!
难道只为了好玩,呵呵.==================================
懒得测试smarty.now,不过strtotime('-0')和time()返回的值应该是一样的.
strtotime('-0')和time()是一样的