title: php/iis: failed to open stream: Permission denied
body: <p>I am trying to do this:</p>
  
  <pre><code>$fh = fopen("req2" , 'w')
  </code></pre>
  
  <p>and I get:</p>
  
  <blockquote>
    <p>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</p>
  </blockquote>
  
  <p>I gave "Full Control" permissions to IIS in the wwwroot directory. I had also tried the absolute path: <code>$_SERVER['DOCUMENT_ROOT']."\\req2"</code></p>
  
  <p>but i still get the same error. I am running IIS 7 on Windows 7.</p>