title: php code to Save pdf file which was generated by php code
body: <p>I have created PDF using php code following these tutorials 
  <a href="https://www.siteground.com/kb/how_to_generate_pdf_files_with_php/" rel="nofollow noreferrer">https://www.siteground.com/kb/how_to_generate_pdf_files_with_php/</a></p>
  
  <p>The .pdf displays correctly on web browser. 
  I need to save this .pdf file on the specific folder on my local machine. 
  Please help me to do so. 
  I tried </p>
  
  <pre><code>file_put_contents($newFileName, $newFileContent);
  </code></pre>
  
  <p>but it is always returning false. </p>