Zitat:
Zitat von Satan_666
Was glaubst Du, macht die rot definierte Zeile?
*grübel*
|
auf 0 setzen, damits wieder 1 wird bei nächsten durchlauf ?
ich hab das so gemacht, weil ich keine weitere schleife hinenipacken wollt, also hier is der ganze code, ich check nicht wo der fehler is:
Code:
<html>
<link rel="shortcut icon" href="favicon.ico" type="image/vnd.microsoft.icon" />
<link rel="icon" href="favicon.ico" type="image/vnd.microsoft.icon" />
<head>
<link rel="stylesheet" type="text/css" href="css.css">
<title>
Index of /
</title>
</head>
<body>
<?php
// open the current directory by opendir
$handle=opendir(".");
$zaehler=0;
while (($file = readdir($handle))!==false) {
$zaehler=$zaehler+1;
if ($zaehler==1){$colour='rot';}
if ($zaehler==2){$colour='green';}
if ($zaehler==3){$colour='blue';}
if ($file !=='files' && $file !=='private' && $file !=='mail' && $file !=='sommer2008'){
echo '<p><a class="'.$colour.'" href="'.$file.'"> </a>';
echo '<a href="'.$file.'">'.$file.'</a>';
}
if ($zaehler==3){$zaehler=0;}
}
closedir($handle);
?>
</table>
</body>
</html>
danke für die anregungen, werds probieren. und ja, ich bin der völlige programmier-noob
