title: How do I prepend file to beginning?
body: <p>In PHP if you write to a file it will write end of that existing file. </p>
  
  <p>How do we prepend a file to write in the beginning of that file?</p>
  
  <p>I have tried <code>rewind($handle)</code> function but seems overwriting if current content is larger than existing.</p>
  
  <p>Any Ideas?</p>