Sun Oct 26, 2008 11:11 pm
<?php
$cfile = "myData.dat";
$fh = fopen($cfile, "r+");
if (!$fh){
die("<BR>Failed to open file <I>$cfile</I>.");
}
$s = fgets($fh, 6);
$count = (int) $s;
$count = $count + 1;
$count = str_pad($count, 6);
rewind($fh);
fwrite($fh, $count);
echo "$count";
fclose($fh);
?>
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com
Powered by phpBB © phpBB Group.