&?php $dir = opendir("./"); while ($baca_file = readdir($dir)) { echo "$baca_file", "\n"; } closedir($dir);?>
COunTEr :
&?php$cfile = "datapengunjung.dat";$fh = fopen($cfile, "r+");
if (!$fh){ die("
Gagal membuka file $cfile.");}$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);?>
Sabtu, 19 Desember 2009
Langganan:
Posting Komentar (Atom)
0 komentar on " "
Posting Komentar