title: fopen/fwrite path above public_html issue
body: <p>I'm testing php scripts on my web server.
  I'm using a basic fopen / fwrite to write data to file.
  The following scripts works perfectly in public_html/ but fails to work in folders above "I'm trying in /test/"</p>
  
  <p>centOS with WHM/cPanel, latest.</p>
  
  <pre><code>&lt;?php
  $fp = fopen('lidn.sh', 'w');
  fwrite($fp, 'Cats chase mice');
  fclose($fp);
  ?&gt;
  </code></pre>
  
  <p>This works fine. However:</p>
  
  <pre><code>&lt;?php
  $fp = fopen('/test/lidn.sh', 'w');
  fwrite($fp, 'Cats chase mice');
  fclose($fp);
  ?&gt;
  </code></pre>
  
  <p>doesn't write anything to file. </p>
  
  <p>I need php to output data to a ".sh" file, so having it inside public_html would, I think, be a gigantic security flaw.</p>
  
  <p>The goal is to securely output data to a ".sh" via PHP</p>