最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
Fatal error: Cannot redeclare 常见问题
时间:2022-06-24 23:54:25 编辑:袖梨 来源:一聚教程网
fatal error: cannot redeclare这种问题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);
}
面我的
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
相关文章
- 企业微信如何进行直播 03-27
- 微博网页版-在线使用入口一键直达 03-27
- 咸鱼商品被下架了怎么办 03-27
- 铁路12306官网登录入口-铁路12306官网登录失败怎么办 03-27
- 智联招聘网页版怎么登录 03-27
- 网站为什么会降权 03-27