Hi! I'm new to php and I need help with my simple script: <?php $handle = fopen("bosko.txt", "r"); $contents = ""; while(!feof($handle)){ $contents .= fread($handle, 1000); } fclose($handle); $firstrep = str_replace(" ", "", $contents); $newphrase = str_replace(",", " ", $firstrep); $fh = fopen("bosko.txt", "w"); fwrite($fh, $newphrase); fclose($fh); ?> I want to open "bosko.txt", to modify it (this part is working) and then to write modified version back to file (this part is NOT working). All I get is: Warning: fopen(bosko.txt) [function.fopen]: failed to open stream: Permission denied in c:\Inetpub\wwwroot\lilypond compiler\02.php on line 10 Warning: fwrite(): supplied argument is not a valid stream resource in c:\Inetpub\wwwroot\lilypond compiler\02.php on line 11 Warning: fclose(): supplied argument is not a valid stream resource in c:\Inetpub\wwwroot\lilypond compiler\02.php on line 12 I'm running PHP 5, on localhost IIS 6, WinXP. Thanks in advance. Waiting for your help.... Bosko
Go into the IIS manager thingy and then Permissions for the site(default site). Look for internet guest account, and make sure write box is ticked. At least I think that's how it worked, has been ages since I have looked at IIS.
Well, I solved my problem with turning off simple sharing in folder view... Anyway, thanks for help. Bosko