Sabtu, 19 Desember 2009

Diposting oleh Aef_ney di 00.48
&?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);?>

0 komentar on " "

Posting Komentar

 

Aef_ Copyright 2009 Sweet Cupcake Designed by Ipiet Templates Image by Tadpole's Notez