title: Laravel local: fopen Permission denied
body: <p>I need help to fix this error: </p>
  
  <blockquote>
    <p>fopen(/Subckt.txt): failed to open stream: Permission denied</p>
  </blockquote>
  
  <ul>
  <li>I'm using Laravel</li>
  <li>I working on the website locally by using the cmd with the php
  artisan serve command</li>
  <li>I've found some potential solution with chmod but since I'm using localhost I dont think it works</li>
  <li>The website is running a php code to do modification to a txt file. Then I saving it to another file. On the root folder.</li>
  <li>The whole website folder is stated as readonly, I can't modify that. (Im using windows 7, when I uncheck the box it gets always rechecked. But I managed to remove the read only from the text files(Subckt.txt and \npn.lib).</li>
  <li>I tried my code without laravel in a php and html file and it works.</li>
  </ul>
  
  <p>Here is my partial code:</p>
  
  <pre class="lang-php prettyprint-override"><code>// Load the output file
  $outputFile = fopen("\Subckt.txt", "w") or die("Unable to open file!"); 
  
  // Load the input file into string
  $inputFile = "\npn.lib";
  
  // Put the input file in a string variable
  $inputFileContent = file_get_contents($inputFile);
  </code></pre>