randycgaz
July 18th, 2003, 09:18
Warning: fopen(xcounter.txt) [function.fopen]: failed to create stream: Permission denied in /home/refined/public_html/amnews/index.php on line 4
Warning: fread(): supplied argument is not a valid stream resource in /home/refined/public_html/amnews/index.php on line 5
Warning: fclose(): supplied argument is not a valid stream resource in /home/refined/public_html/amnews/index.php on line 6
Warning: fopen(xcounter.txt) [function.fopen]: failed to create stream: Permission denied in /home/refined/public_html/amnews/index.php on line 9
Warning: fwrite(): supplied argument is not a valid stream resource in /home/refined/public_html/amnews/index.php on line 10
Warning: fclose(): supplied argument is not a valid stream resource in /home/refined/public_html/amnews/index.php on line 11
---------------------------
This counter is what the above error is referring to.
I need to set permissions to r+. But how?
<?php
$file = "xcounter.txt";
unset($h);
$f = fopen($file, "r+");
$h = fread($f, filesize($file));
fclose($f);
if (!$mevisit) {
$h++;
$f = fopen($file, "w+");
fwrite($f, $h);
fclose($f);
@setcookie("mevisit","yes",time()+31536000);
}
?>
Warning: fread(): supplied argument is not a valid stream resource in /home/refined/public_html/amnews/index.php on line 5
Warning: fclose(): supplied argument is not a valid stream resource in /home/refined/public_html/amnews/index.php on line 6
Warning: fopen(xcounter.txt) [function.fopen]: failed to create stream: Permission denied in /home/refined/public_html/amnews/index.php on line 9
Warning: fwrite(): supplied argument is not a valid stream resource in /home/refined/public_html/amnews/index.php on line 10
Warning: fclose(): supplied argument is not a valid stream resource in /home/refined/public_html/amnews/index.php on line 11
---------------------------
This counter is what the above error is referring to.
I need to set permissions to r+. But how?
<?php
$file = "xcounter.txt";
unset($h);
$f = fopen($file, "r+");
$h = fread($f, filesize($file));
fclose($f);
if (!$mevisit) {
$h++;
$f = fopen($file, "w+");
fwrite($f, $h);
fclose($f);
@setcookie("mevisit","yes",time()+31536000);
}
?>