title: Trying to write a file to a different directory using fopen()
body: <p>I'm trying to write a file from one directory to another. For example, <a href="http://www.xxxxxxx.com/admin/upload.php" rel="noreferrer">http://www.xxxxxxx.com/admin/upload.php</a> to <a href="http://www.xxxxxxx.com/posts/filename.php" rel="noreferrer">http://www.xxxxxxx.com/posts/filename.php</a></p>
  
  <p>I've read that I cannot write a file by using the HTTP path, how do I use a local path?</p>
  
  <pre><code>$ourFileName = "http://www.xxxxxxxx.com/articles/".$thefile.".php";
  $ourFileHandle = fopen($ourFileName, 'w') or die("can't open file");
  </code></pre>