我收到了这个错误,但不知道我在哪里犯了错误。如果你能帮助我我在 php 方面不是很好的话,那就太好了。
致命错误:无法在 /Applications/XAMPP/xamppfiles/htdocs/newapproach/utils/head.php 中重新声明 top()(之前在 /Applications/XAMPP/xamppfiles/htdocs/newapproach/utils/head.php:3 中声明) 62
代码是:
<?php
include 'nav.php';
function top($location, $pagename, $name, $seclevel, $slider, $fancy){
$pre = '';
if ($location == 1){
$pre = '../';
}
if ($name) {
$navedit = navnon($location1);
}else{
$navedit = navuser($username, $location1);
}
$text = '<!Doctype HTML>
<html>
<head>
'.logo().'
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="'.$pre.'css/nav.css" />';
if ($slider){
$text .= '<link rel="stylesheet" href="'.$pre.'css/flexslider.css" type="text/css">';
}
if ($fancy){
$text .= '<link rel="stylesheet" href="'.$pre.'fancy/jquery.fancybox-1.3.4.css" type="text/css" media="screen" />';
}
$text .= '<title>ABI 2015 - '.$pagename.'</title>
<script src="'.$pre.'js/jquery.min.js"></script>';
if($slider){
$text .= '<script src="'.$pre.'js/jquery.flexslider.js"></script>';
}
if ($fancy){
$text .= '<script type="text/javascript" src="'.$pre.'/fancy/jquery.fancybox-1.3.4.pack.js"></script>';
}
$text .= '<script type="text/javascript">
$(document).ready(function(){
$("a#ex").click(function(){
alert(unescape("Dies ist ein Externer Link die WEB-seite %FCbernimmt keine Verantwortung f%FCr externe Links und die Inhalte auf den verlinkten Seite."));
});';
if ($slider){
$text .= ' $(".flexslider").flexslider({
animation: "fade",
animationLoop: true,
slideshow:true,
controlNav:false,
});';
}
if ($fancy){
$text .= '$("a.inline").fancybox({
"hideOnContentClick": false;
});';
}
$text .= '});
</head>
<body id="bg">
<div id="feedback"><a href="'.$pre.'html/feedback.html"><img src="'.$pre.'pic/feedback.png"/></a></div>
'.$navedit.'
<div id="line">';
return $text;
}
?>