Click to See Complete Forum and Search --> : read & write


Anon
06-29-2002, 10:50 PM
how do i make a chmod 666 for a file or a dir with apache for windows 2.0

i need this to make a counter work...(update the count.txt file)

thanks a lots

Anon
06-29-2002, 11:19 PM
how to chmod in windows

Anon
07-01-2002, 01:21 PM
okay, heres your problem... Windows does not support chmod, that is a linux thing. In windows all files are readable or writtable, unless specified otherwise.

to open a file, here is the code you need:

$counter_file = fopen("counter.txt", "w+");
$current_counts = fread($counter_file, filesize("counter.txt"));
$current_counts = $current_counts + 1;
fwrite($counter_file, $current_counts);
fclose($counter_file);

I believe that is correct...