title: PHP fopen() does not create a file
body: <p>According to <a href="http://www.php.net/manual/en/function.fopen.php" rel="noreferrer">fopen documentation</a>, in some modes it will create the file if it does not exist, but in my situation, I've checked all 'w', 'w+', 'x' and 'x+' modes but it's just throwing warnings at me and it cannot create the file.</p>
  
  <p>It's my code:</p>
  
  <pre><code>$this-&gt;handle = fopen($this-&gt;log_name, 'w');
  </code></pre>
  
  <p>and what I get:</p>
  
  <pre><code>Warning: fopen(D:\xampp\htdocs\farid\logs\error.php) [function.fopen]: failed to open stream: No such file or directory in D:\xampp\htdocs\farid\libraries\error\log.php on line 34
  Warning: fwrite() expects parameter 1 to be resource, boolean given in D:\xampp\htdocs\farid\libraries\error\log.php on line 66
  Warning: fclose() expects parameter 1 to be resource, boolean given in D:\xampp\htdocs\farid\libraries\error\log.php on line 27
  </code></pre>
  
  <p>And I'm working in windows environment.</p>