das ist der gesamte code wenn ich die seite aufrufe sieht man aber nirgens den besucherzähler
Code:
<?
$datei_name = "counter.txt";
if (!file_exists($datei_name)) {
$dz = fopen($datei_name, "w");
fwrite($dz,"0");
fclose($dz);
}
$dz = fopen(datei_name,"r");
$counter = fread($dz, 10);
fclose($dz);
$besucher = $_COOKIE['besucher'];
if (!isset($besucher)){
setcookie ("besucher","ja");
$counter++;
$dz = fopen($datei_name, "w");
fwrite($dz, $counter);
fclose($dz);
}
$anzahl = strlen($counter);
$counter_grafik = "";
for ($pos = 0; $pos < $anzahl; $pos++){
$ziffer = substr($counter, $pos, 1);
$counter_grafik = "<img src=\"$ziffer.gif\">";
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>roadhouse-greiz die rock- und metalbar in greiz</title>
<script type="text/javascript">
<!--
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
</head>
<style type="text/css">
<!--
body{
font-family:"Old English Text MT", Morpheus;
margin: 15px;
color:#FFF;
}
#menue{
position:absolute;
text-align:center;
right:auto;
left:auto;
margin:auto;
margin-top:0;
top:25em;
width:100%;
<!-- [if gte IE 5.5]> left:50%; <![endif] -->
}
#kopfli{
position:relative;
left:0px;
text-align:left;
margin:auto;
bottom:5px;
}
.kopfre{
position:relative;
text-align:right;
right:0px;
margin:auto;
bottom:5px;
}
#center{
position:relative;
text-align:center;
right:auto;
left:auto;
margin:auto;
bottom:5px;
}
#table{
position:absolute;
text-align:center;
right:auto;
left:auto;
margin:auto;
margin-top:0;
top:10px;
width:100%;
}
#hinweis{
position:absolute;
text-align:center;
right:auto;
left:auto;
margin:auto;
margin-top:0;
top:10px;
width:100%;
}
.konimphaft{
position:absolute;
text-align:right;
right:0px;
color:#FFF;
bottom:5px;
font-family:"Morpheus";
}
<!--
-->
</style>
<body bgcolor="#000000" onload="MM_preloadImages('bilder/layout/bar1.jpg','bilder/layout/foto1.jpg','bilder/layout/security1.jpg')">
<table cellpadding="0" cellspacing="5em" id="table">
<tr>
<td><img src="bilder/layout/logo.jpg" width="153" height="114" id="kopfli"/>
</td><td width="45px"></td>
<td><img src="bilder/layout/roadhouse.jpg" width="575" height="73" id="center"/></td>
</td><td width="45px"></td>
<td><img src="bilder/layout/logo.jpg" width="153" height="114" class="kopfre"/></td>
</tr>
</table>
<div id="hinweis">Optimiert für Firefox 3.0</div>
<table class="konimphaft">
<tr>
<td><a href="kontakt.html">Kontakt</a></td>
</td><td width="45px"></td>
<td><a href="impress.html">Impressum</a></td>
</td><td width="45px"></td>
<td><a href="haft.html">Haftungsausschluss</a></td>
<td>
<? echo $counter_grafik;?>
</td>
</tr>
</table>
<table cellpadding="0" cellspacing="5em" id="menue">
<tr><td><a href="bar.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Bild4','','bilder/layout/bar1.jpg',1)"><img src="bilder/layout/bar.jpg" alt="roadhouse bar" name="Bild4" border="0" id="Bild4" /></a></td><td width="45px"></td>
<td><a target="_blank" href="http://fotoart.roadhouse-greiz.de/#0.0" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Bild5','','bilder/layout/foto1.jpg',1)"><img src="bilder/layout/foto.jpg" alt="Fotoart" name="Bild5" width="233" height="108" border="0" id="Bild5" /></a></td>
</td><td width="45px"></td>
<td><a href="security.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Bild6','','bilder/layout/security1.jpg',1)"><img src="bilder/layout/security.jpg" alt="Roadhouse Security" name="Bild6" width="233" height="108" border="0" id="Bild6" /></a></td>
</tr>
</table>
</body>
</html>