$a = 2;
" ;
$cfile = " datapengunjung.dat" ;
$fh = fopen($cfile, " r+" );
if (!$fh){
die("
Gagal membuka file <> $cfile< /I> . " );
}
$s = fgets($fh, 6);
$hitung = (int) $s;
$hitung = $hitung + 1;
$hitung = str_pad($hitung, 6);
rewind($fh);
fwrite($fh, $hitung);
echo " Anda pengunjung ke $hitung" ;
fclose($fh);
? >
< ?php
$dir = opendir(" ./ " );
while ($baca_file = readdir($dir))
{
echo " $baca_file" , " \n" ;
}
closedir($dir);
? >