file permissions on counter?
| From: | Antonio | Date: | Wed, 24 Apr 2002 01:48:01 +0000 |
| Subject: | file permissions on counter? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-94294@lists.php.net to get a copy of this message | ||
Hi, I have to read a simple counter on my server, but the server
responses that I haven't permissions to open the file which contains the
data in write mode. This file (counter.txt) it has all the permissions
(777). I don't know how to do, could somebody help me?
I execute this file on server:
<HTML>
<HEAD>
<TITLE></TITLE>
<BODY>
<?php
$userip = $REMOTE_ADDR;
if ($file=fopen("counter.txt", "w")) {
$counter = fread($file, 10);
$counter++;
fwrite($file , $counter);
fclose($file);
}
echo $counter;
?>
</body>
</html>