title: Change file CHMOD when uploading with this code
body: <pre><code>&lt;?php
  </code></pre>
  
  <blockquote>
    <p>class File_Streamer
       {<br><br>
          private $fileName;<br>
          private $contentLength;<br>
          private $path;<br></p>
  
  <pre><code>    public function __construct()
      {
          if (array_key_exists('HTTP_X_FILE_NAME', $_SERVER) &amp;&amp; array_key_exists('CONTENT_LENGTH', $_SERVER)) {
              $this-&gt;fileName = $_SERVER['HTTP_X_FILE_NAME'];
              $this-&gt;contentLength = $_SERVER['CONTENT_LENGTH'];
  </code></pre>
  </blockquote>
  
  <pre><code>        } else throw new Exception("Error retrieving headers");
      }
  
      public function setDestination($p)
      {
          $this-&gt;path = $p;
  
      }
  
      public function receive()
      {
          if (!$this-&gt;contentLength &gt; 0) {
              throw new Exception('No file uploaded!');
          }
  
          file_put_contents(
              $this-&gt;path . $this-&gt;fileName, 
              file_get_contents("php://input")
          )
          ;
          return true;
      }
  }
  ?&gt;
  </code></pre>
  
  <hr>
  
  <p>I have this code to upload my files, but i want them to upload with CHMOD 755, need some help, please.</p>