title: file_put_contents on localhost on Mac OS X
body: <p>I try to create SVG's with the following code:</p>
  
  <pre><code>&lt;?php
  
  $codes = file('someFile.txt');
  
  foreach ($codes as $code) {
  
      ob_start();
  
  
  echo '&lt;?xml version="1.0" encoding="utf-8"?&gt;';
  
  ?&gt;
  &lt;!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"&gt;
  &lt;svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
       width="2075px" height="775px" viewBox="0 0 2075 775" enable-background="new 0 0 2075 775" xml:space="preserve"&gt;
  &lt;/svg&gt;
  &lt;?php 
  
      if (file_put_contents("/out/".$code.".svg", ob_get_clean()) === false) {
          echo "error\n";
      }
  }
  
  
  ?&gt;
  </code></pre>
  
  <p>For this I use MAMP on Mac OS X.
  In my browser I see "error" a lot of times so <code>file_put_contents</code> is likely to go wrong.</p>
  
  <p>The permissions of the folder where my php file is located are set like this:
  <img src="https://i.stack.imgur.com/1PXyA.png" alt="permissions"></p>
  
  <p>I also have set the permissions like this:
  <img src="https://i.stack.imgur.com/YLZZV.png" alt="permissions terminal"></p>
  
  <p>I'm expecting the files to come in the <code>out</code> folder in the htdocs of MAMP in the folder where the php file is located. So for this example: <code>/Applications/MAMP/htdocs/NEXT_Logo_001</code> Is this correct? </p>
  
  <p>Long story short, I don't have any files at the moment and I have no clue what to do.
  Someone ideas?</p>