Hello Experts,
Following is my code, and it gives me the error "failed to open stream: Permission denied". I am using PHP 5.2 with IIS installed on windows XP system.
PHP Code:<html>
<head>
<title></title>
<body>
<?PHP
$file=file_get_contents("test/count.txt");
echo "Visitor #: $file";
$visitors = $file;
$visn = $visitors + 1;
$handle = fopen("test/count.txt","w");
fwrite($handle, $visn);
fclose($handle);
?>
</body>
</html>
and the complete error it shows is:
Please help.Code:Visitor #: 0PHP Warning: fopen(test/count.txt) [function.fopen]: failed to open stream: Permission denied in D:\MyWeb\testPHP_Files.php on line 10 PHP Warning: fwrite(): supplied argument is not a valid stream resource in D:\MyWeb\testPHP_Files.php on line 11 PHP Warning: fclose(): supplied argument is not a valid stream resource in D:\MyWeb\testPHP_Files.php on line 12


Reply With Quote

Bookmarks