致命错误:无法在第45行的C:\ wamp \ www \ mysite \ includes \ header.php中重新声明header() [英] Fatal error: Cannot redeclare header() in C:\wamp\www\mysite\includes\header.php on line 45

查看:102
本文介绍了致命错误:无法在第45行的C:\ wamp \ www \ mysite \ includes \ header.php中重新声明header()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好

测试我的页面时,连接到本地主机时遇到问题

一直告诉我有错误

致命错误:无法在第45行的C:\ wamp \ www \ mysite \ includes \ header.php中重新声明header()


以下是我的文件

 <?  php  
 
 功能    header() 
 
  { 
 
 ? > 
<  头部 > 
<      ="   Content-Type"   内容  ="  text/html; charset = utf-8" / <  标题 > .:: mysite :: .. <  /title  > 
<  脚本    ="   Scripts/AC_RunActiveContent.js"   类型  ="  text/javascript" <  /script  > 
<  样式    ="   text/css" <!-  
#apDiv1 {
    位置:绝对;
    左:154px;
    顶部:16px;
    宽度:799px;
    高度:170像素;
    z-index:1;
}
.headercss {
    边框:细实线#000000;
}
身体 {
    左边距:0px;
    margin-top:0px;
    右边距:0px;
    底边距:0px;
}
 ->  
<  /style  > 
<  /head  > 
<  正文 > 
<      ="   772" 边框  > 0"     align   =" 居中" 单元格填充   1"  cellspacing   ="      ="  > 
  <   tr  > 
    <   td     ="   788" <    类型  ="  > 
AC_FL_RunContent('codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','765','height ','166','title','header','src','animation/header','quality','high','pluginspage','http://www.adobe.com/shockwave/download /download.cgi?P1_Prod_Version=ShockwaveFlash','movie','animation/header'); //结束AC代码
<  /script  >  <   noscript  >  <     ="    代码库  ="    宽度  ="    高度  ="     ="  标题" > 
      <   param     ="  电影"   动画/标题.swf" / <   param     ="   quality"   高"   / > 
      <  嵌入    ="   animation/header.swf"   质量  =" 高"     pluginspage   ="  http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" 类型  ="  宽度   765"   高度  ="  >  <  /embed  > 
    <  /object  >  <  /noscript  >  <  /td  > 
  <  /tr  > 
<  /table  > 
<?  php  
 
 }  
 
 ? > 
<  /body  > 
<  /html  >  

解决方案

您可能正在将该php文件加载到另一个文件中,并且php两次看到函数header().


hi everybody

am having a problem connecting to my localhost when testing my page

it keeps telling me that there is an error

Fatal error: Cannot redeclare header() in C:\wamp\www\mysite\includes\header.php on line 45


below is my file

<?php

function header()

{

?>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>.::mysite::.</title>
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
<style type="text/css">
<!--
#apDiv1 {
    position:absolute;
    left:154px;
    top:16px;
    width:799px;
    height:170px;
    z-index:1;
}
.headercss {
    border: thin solid #000000;
}
body {
    margin-left: 0px;
    margin-top: 0px;
    margin-right: 0px;
    margin-bottom: 0px;
}
-->
</style>
</head>
<body>
<table width="772" border="0" align="center" cellpadding="1" cellspacing="1" class="headercss">
  <tr>
    <td width="788"><script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','765','height','166','title','header','src','animation/header','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','animation/header' ); //end AC code
</script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="765" height="166" title="header">
      <param name="movie" value="animation/header.swf" />
      <param name="quality" value="high" />
      <embed src="animation/header.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="765" height="166"></embed>
    </object></noscript></td>
  </tr>
</table>
<?php

}

?>
</body>
</html>

解决方案

You may be loading that php file in another file, and php sees the function header() twice.


这篇关于致命错误:无法在第45行的C:\ wamp \ www \ mysite \ includes \ header.php中重新声明header()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆