时间:2021-07-01 10:21:17 帮助过:41人阅读
function mydate($format='y-m-d h:i:s',$timest=0)
{
global $cfg_cli_time;
$addtime = $cfg_cli_time * 3600;
if(empty($format))
{
$format = 'y-m-d h:i:s';
}
return gmdate ($format,$timest+$addtime);
}
面我的
require_once(dedeinc."/inc/inc_fun_funstring.php");
也包含了一个名为mydate的函数如果现在我们这样用就出现如
a.php
require_once(dedeinc."/inc/inc_fun_funstring.php");
function mydate($format='y-m-d h:i:s',$timest=0)
{
global $cfg_cli_time;
$addtime = $cfg_cli_time * 3600;
if(empty($format))
{
$format = 'y-m-d h:i:s';
}
return gmdate ($format,$timest+$addtime);
}
就会出现fatal error: cannot redeclare mydate() (previously declared in
http://www.bkjia.com/PHPjc/632300.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/632300.htmlTechArticlefatal error: cannot redeclare这种问题php教程 开发可能会碰到过,原因是很简单的,就是重复调用了相同名字的函数, function mydate($format='y-m-d h...