start(); } protected function start() { ob_start(); echo ''; } public function save($path) { echo ""; $data = ob_get_contents(); ob_end_clean(); $this->wirtefile($path, $data); ob_flush(); flush(); } protected function wirtefile($fn, $data) { $fp=fopen($fn, "wb"); fwrite($fp, $data); fclose($fp); } }