I am trying to do this:
$fh = fopen("req2" , 'w')
and I get:
Warning: fopen(D:\inetpub\wwwroot\req2) [function.fopen]: failed to open stream: Permission denied in D:\inetpub\wwwroot\test.php on line 44 can't open file
I gave "Full Control" permissions to IIS in the wwwroot directory. I had also tried the absolute path: $_SERVER['DOCUMENT_ROOT']."\\req2"
but i still get the same error. I am running IIS 7 on Windows 7.
In Windows, you need to give user, IUSR
the permission.
This worked for me:
Right click folder --> Properties --> Security --> Edit --> allow Full Control --> apply --> do this for all, or just the correct user
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With