PHP错误:Fatal error: Cannot redeclare mydate()
Fatalerror:Cannotredeclaremydate()(previouslydeclaredind:\webhost\wujing1608\web\core...
Fatal error: Cannot redeclare mydate() (previously declared in
d:\webhost\wujing1608\web\core\func_ext.php:663) in
d:\webhost\maitianshu\web\include\common.func.php on line 53
请问如何修改,我不懂,请教高手。。。
第53行....
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);
}
function GetAlabNum($fnum)
{
$nums = array("0","1","2","3","4","5","6","7","8","9");
//$fnums = "0123456789";
$fnums = array("0","1","2","3","4","5","6","7","8","9");
$fnum = str_replace($nums,$fnums,$fnum);
$fnum = ereg_replace("[^0-9\.-]",'',$fnum);
if($fnum=='')
{
$fnum=0;
}
return $fnum;
}
function Html2Text($str,$r=0)
{
if(!function_exists('SpHtml2Text'))
{
require_once(DEDEINC."/inc/inc_fun_funString.php");
}
if($r==0)
{
return SpHtml2Text($str);
}
else
{
$str = SpHtml2Text(stripslashes($str));
return addslashes($str);
}
}
重复了函数怎么改呀。。?????? 展开
d:\webhost\wujing1608\web\core\func_ext.php:663) in
d:\webhost\maitianshu\web\include\common.func.php on line 53
请问如何修改,我不懂,请教高手。。。
第53行....
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);
}
function GetAlabNum($fnum)
{
$nums = array("0","1","2","3","4","5","6","7","8","9");
//$fnums = "0123456789";
$fnums = array("0","1","2","3","4","5","6","7","8","9");
$fnum = str_replace($nums,$fnums,$fnum);
$fnum = ereg_replace("[^0-9\.-]",'',$fnum);
if($fnum=='')
{
$fnum=0;
}
return $fnum;
}
function Html2Text($str,$r=0)
{
if(!function_exists('SpHtml2Text'))
{
require_once(DEDEINC."/inc/inc_fun_funString.php");
}
if($r==0)
{
return SpHtml2Text($str);
}
else
{
$str = SpHtml2Text(stripslashes($str));
return addslashes($str);
}
}
重复了函数怎么改呀。。?????? 展开
展开全部
d:\webhost\wujing1608\web\core\func_ext.php:663) in
d:\webhost\maitianshu\web\include\common.func.php on line 53
你看,至少两个文件已经定义了相同的mydate函数,如果要改的话,把自己的这个mydate改名。另外,打开找到func_ext.php和common.func.php文件的mydate(),如果是一样的,注释掉一个。如果不一样,看哪一个是必须的,然后注释掉一个。
d:\webhost\maitianshu\web\include\common.func.php on line 53
你看,至少两个文件已经定义了相同的mydate函数,如果要改的话,把自己的这个mydate改名。另外,打开找到func_ext.php和common.func.php文件的mydate(),如果是一样的,注释掉一个。如果不一样,看哪一个是必须的,然后注释掉一个。
展开全部
Fatal error: Cannot redeclare mydate() (previously declared in
d:\webhost\wujing1608\web\core\func_ext.php:663) in
d:\webhost\maitianshu\web\include\common.func.php on line 53
重复定义了 函数 mydate()
d:\webhost\wujing1608\web\core\func_ext.php:663) in
d:\webhost\maitianshu\web\include\common.func.php on line 53
重复定义了 函数 mydate()
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
很明显,mydate() 这个函数定义重复了。你好好检查下这个函数是不是在别的地方也定义过了。
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询