start -
stop achtergrondgeluid
if (file_exists("teller.txt")) {
$bestand = fopen("teller.txt", "r+"); // Bestand openen
$telling = fgets($bestand, 6); // Tellerstand lezen
$telling++; // Stand verhogen met 1
rewind($bestand); // Pointer terugzetten
fwrite($bestand, $telling, 6); // Stand wegschrijven
fclose($bestand); // Bestand sluiten
} else {
$bestand = fopen("teller.txt", "w"); // Bestand openen
$telling = "1"; // Stand op 1 zetten
fwrite($bestand, $telling, 6); // Stand wegschrijven
fclose($bestand); // Bestand sluiten
}
// Telling vullen met voorloopnullen:
$telling = sprintf("%05d", $telling);
// Teller samenstellen uit afbeeldingen:
$teller = "";
for ($i = 0; $i < 5; $i++) {
$teller .= '
';
}
// Teller weergeven:
echo '';
echo $teller;
echo '
';
?>Bert Vos OW Fotografie.
Mail de webmaster.