Smarty的date_format总是提示参数不对,按照手册的代码测试都不行
index.php<?phprequire_once'./init.inc.php';$smarty->display("index.html")?>index.tpl{...
index.php
<?php
require_once './init.inc.php';
$smarty->display("index.html")
?>
index.tpl
{$smarty.now|date_format}<br/>
{$smarty.now}
smarty对象已经初始化么问题的.{$smarty.now}可以显示 当前时间戳。但是{$smarty.now|date_format}出错,提示Warning: date_format() expects exactly 2 parameters, 1 given in D:\wamp\www\date_test\libs\sysplugins\smarty_internal_templatebase.php(171) : eval()'d code on line 30 展开
<?php
require_once './init.inc.php';
$smarty->display("index.html")
?>
index.tpl
{$smarty.now|date_format}<br/>
{$smarty.now}
smarty对象已经初始化么问题的.{$smarty.now}可以显示 当前时间戳。但是{$smarty.now|date_format}出错,提示Warning: date_format() expects exactly 2 parameters, 1 given in D:\wamp\www\date_test\libs\sysplugins\smarty_internal_templatebase.php(171) : eval()'d code on line 30 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询