can't read file
i am using php4 on a windows 2000 platform running IIS 5.
on page 328 of the book i tried to do the counter example, but it does not work. i can not open the file.
has it something to do with teh slashes or because windows use different slashes than UNIX?
here is the code
<?php
//hit_counter1.php
$counter_file="./count.dat";
if (!($fp = fopen($counter_file, "r"))) die ("Cannot open $counter_file");
$counter = (int) fread($fp, 20);
fclose($fp);
$counter++;
echo"You are the visitor no $counter.";
$fp = fopen($counter_file, "w");
fwrite($fp, $counter);
fclose($fp);
?>
thanks a lot in advance
nikos
|