title: how to output the time and date in dompdf?
body: <p>dompdf output with date and time in the file name. As of now it over writes the current file, which I don't want to happen. I need it to save as a new file, so tot to add time and date at the end of the file name which will be read as a new file.</p>
  
  <p><strong>Code</strong></p>
  
  <pre><code>private $curDir;
  
      public function __construct() {
          global $cur_dir;
          $this-&gt;curDir = $cur_dir;
      }
  
      private function getHtml() {
          ob_start();
          include($this-&gt;curDir . '/quote-credit.php');
          $retStr = ob_get_contents();
          ob_end_clean();
          return $retStr;
      }
  
      public function getPdf() {      
          $html = $this-&gt;getHtml();
          $dompdf = new DOMPDF();
          $dompdf-&gt;load_html($html);
          $dompdf-&gt;render();
          $dompdf-&gt;stream( "credit.pdf", array("Attachment" =&gt; 0));
          $output = $dompdf-&gt;output();
  
          $pdfFileName = $this-&gt;curDir.'/credit.pdf';
          file_put_contents($pdfFileName, $output);
      }
  </code></pre>