title: PHP multiple ob_start() and ob_end_clean() function not work
body: <p>I have this index page :</p>
  <pre><code>&lt;?PHP
  ob_start();
  session_name('D12TYU');
  @session_start();
  ob_end_clean();
  require ABSPATH .'/config.php';
  require ABSPATH . '/class/backup.php';
  ?&gt;
  &lt;!DOCTYPE html&gt;
  &lt;html&gt;
  ....... html+&lt;?PHP ?&gt; Code
  &lt;/html&gt;
  </code></pre>
  <p>in backup class i have this code for download backup file :</p>
  <pre><code>    class DB_Backup
      {
      //OTHER CODE
  
      public function download($file)
      {
      ob_start();
      $filename = $this-&gt;dir . $file;
      $fp = fopen($filename, &quot;rb&quot;);
      header(&quot;Pragma: public&quot;);
      header(&quot;Expires: 0&quot;);
      header(&quot;Cache-Control: must-revalidate, post-check=0, pre-check=0&quot;);
      header(&quot;Cache-Control: public&quot;);
      header(&quot;Content-Description: File Transfer&quot;);
      header(&quot;Content-type: application/octet-stream&quot;);
      header(&quot;Content-length: &quot; . filesize($filename));
      header(&quot;Content-disposition: attachment;filename = &quot; . $file . &quot;&quot;);
      ob_end_clean();
      die(fpassthru($fp));
      fclose($fp);
      }
  
      //OTHER CODE
      }
  </code></pre>
  <p>now, when click in link(<code>?action=options&amp;mod=backup&amp;do=download&amp;id=db-backup.zip</code>) for download file i see this:</p>
  <p><img src="https://i.stack.imgur.com/xOjmZ.png" alt="enter image description here" /></p>
  <p>i cant download my backup files. i think my problem is <code>ob_start();</code> and <code>ob_end_clean();</code>. how do can i fix my problem ?!</p>