Hi,
ich hab mal wieder so nen komisches Problem!
Ich hab neulich von funpic.de auf revido.de (werbefrei + Domain) gewechselt.
So, nun hab ich wollen die ganze Seite "rüberladen", hab das soweit auch hinbekommen... doch..
ich hab in meiner Navigation nen Counter installiert, bei Funpic hat der immer funktioniert, warum aber nicht bei Revido.de? wo liegt der Fehler? Es kommt die Meldung
Warning: Cannot modify header information - headers already sent by (output started at /var/www/web267/html/navi.php:5) in /var/www/web267/html/navi.php on line 138
Aber ich check nicht, was das Programm von mir will... bei Funpic war das auch mal der Fall, als meine Datei zu lang war und ich weit unten dran setcookie und header benutzt habe.
Da ist jedenfalls mal der Quellcode:
<html>
<head>
<link rel="Stylesheet" style="text/css" href="style.css">
<style style="text/css">
<!--
a:link { color:#000000; text-decoration:none; }
a:visited { color:#000000; text-decoration:none; }
a:hover { color:orange; text-decoration:none; }
a:active { color:orange; }
-->
</style>
<script type="text/javascript">
<!--
PisNews = "PisNews";
PisPrev = "PisPrev";
PisRev = "PisRev";
PisTeam = "PisTeam";
PisGuest = "PisGuest";
function PisShow(BildY) {
document.getElementById(BildY).style.visibility = "visible";
}
function PisDel(BildY) {
document.getElementById(BildY).style.visibility = "hidden";
}
-->
</script>
</head>
<body style="margin-right:0; margin-top:0px; background-image:url(pics/navi.PNG); background-repeat:no-repeat; background-attachment:fixed;">
<div align="right">
<table cellpadding="0" cellspacing="0" sytle="text-align:right;">
<TR>
<TD align="right">
<img src="pics/Pistol.bmp" id="PisNews" style="visibility:hidden;">
</TD>
<TD>
<table class="tabN1" style="border-bottom-width:0px; border-right-color:#888888;">
<TR>
<TD>
<a href="news.htm" onMouseOver="PisShow(PisNews);" onMouseOut="PisDel(PisNews);" target="main">News</a>
</TD>
</TR>
</table>
</TD>
</TR>
<TR>
<TD align="right">
<img src="pics/Smg.bmp" id="PisPrev" style="visibility:hidden;">
</TD>
<TD>
<table class="tabN2" onMouseOver="PisShow(PisPrev);" onMouseOut="PisDel(PisPrev);" style="border-bottom-width:0px; border-right-color:#888888;">
<TR>
<TD>
<a href="navipreview.htm" target="navi2">Previews</a>
</TD>
</TR>
</table>
</TD>
</TR>
<TR>
<TD align="right">
<img src="pics/Shotgun.bmp" id="PisRev" style="visibility:hidden;">
</TD>
<TD>
<table class="tabN1" onMouseOver="PisShow(PisRev);" onMouseOut="PisDel(PisRev);" style="border-bottom-width:0px; border-right-color:#888888;">
<TR>
<TD>
<a href="navireview.htm" target="navi2">Reviews</a>
</TD>
</TR>
</table>
</TD>
</TR>
<TR>
<TD align="right">
<img src="pics/M16.bmp" id="PisTeam" style="visibility:hidden;">
</TD>
<TD>
<table class="tabN2" onMouseOver="PisShow(PisTeam);" onMouseOut="PisDel(PisTeam);" style="border-bottom-width:0px; border-right-color:#888888;">
<TR>
<TD>
<a href="Team/team.htm" target="main">Team</a>
</TD>
</TR>
</table>
</TD>
</TR>
<TR>
<TD>
</TD>
<TD>
<table class="tabN1" style="border-bottom-width:0px; border-right-color:#888888; border-bottom-color:#888888;">
<TR>
<TD>
Members
</TD>
</TR>
</table>
</TD>
</TR>
<TR>
<TD>
</TD>
<TD>
<table class="tabN2a" style="border-style:solid; border-width:2px; border-color:#888888; border-top-width:0px;">
<TR>
<TD>
<a href="Reviewwrite.htm" target="main">Bericht schreiben</a>
</TD>
</TR>
</table>
<br>
</TD>
</TR>
<TR>
<TD align="right">
<img src="pics/Grenade.bmp" id="PisGuest" style="visibility:hidden;">
</TD>
<TD>
<table class="tabN2" onMouseOver="PisShow(PisGuest);" onMouseOut="PisDel(PisGuest);" style="border-right-color:#888888; border-bottom-color:#888888;">
<TR>
<TD>
<a href="Guest/guest.php" target="main">Guest</a>
</TD>
</TR>
</table>
</TD>
</TR>
</table>
<br>
<span class="name">Visitor No:</span>
<span class="count">
<?php
$Countfile = "counter.txt";
$ip = getenv ("REMOTE_ADDR");
setcookie ("ipsperre",$ip,time()+3600);
if(isset($ipsperre))
{
if(file_exists($Countfile))
{
$Counter = file($Countfile);
if($Counter[0]<10) echo "00000".$Counter[0];
elseif($Counter[0]>9 && $Counter[0]<100) echo "0000".$Counter[0];
elseif($Counter[0]>99 && $Counter[0]<1000) echo "000".$Counter[0];
elseif($Counter[0]>999 && $Counter[0]<10000) echo "00".$Counter[0];
elseif($Counter[0]>9999 && $Counter[0]<100000) echo "0".$Counter[0];
else echo $Counter[0];
}
else echo "000000";
}
else
{
if(file_exists($Countfile))
{
$Counter = file($Countfile);
$Counter[0]++;
$fp = fopen($Countfile,"w");
flock($fp,2);
fputs($fp,$Counter[0]);
flock($fp,3);
fclose($fp);
if($Counter[0]<10) echo "00000".$Counter[0];
elseif($Counter[0]>9 && $Counter[0]<100) echo "0000".$Counter[0];
elseif($Counter[0]>99 && $Counter[0]<1000) echo "000".$Counter[0];
elseif($Counter[0]>999 && $Counter[0]<10000) echo "00".$Counter[0];
elseif($Counter[0]>9999 && $Counter[0]<100000) echo "0".$Counter[0];
else echo $Counter[0];
}
else echo "000000";
}
?>
</span>
</div>
</body>
</html>
Vielen Dank für's helfen.
Gruß Marcel