Posted by nihad.nasim on 05/27/07 17:02
Hi,
I am kind of new to PHP and while learning I came across the touch
command which creates a new file. I also came up with fopen to open a
file. In both cases I am having the same problem:
Source Code:
<?
$fp=fopen("secondfile.txt", 'w');
fclose($fp);
?>
Result:
Warning: fopen(secondfile.txt) [function.fopen]: failed to open
stream: Permission denied in c:\Inetpub\wwwroot\test.php on line 2
Warning: fclose(): supplied argument is not a valid stream resource in
c:\Inetpub\wwwroot\test.php on line 3
I am running windows xp professional sp2 with localhost. I don't have
any problems reading a file. Its writing where I am having problems.
Any help is appreciated. Thanks
Navigation:
[Reply to this message]
|