Share Pastebin
Guest
Public paste!

Untitled

By: a guest | Mar 10th, 2008 | Syntax: PHP | Size: 0.32 KB | Hits: 62 | Expires: Never
Copy text to clipboard
  1.                 header('Content-type: application/vnd.oasis.opendocument.text');       
  2.                 header('Content-Disposition: attachment; filename="' . $this->viewVars['course']['title'] . '.odt"');
  3.                 header("Content-Length: " .  filesize($destinationFile));
  4.                 header("Content-Transfer-Encoding: binary\n");
  5.                
  6.                 readfile($destinationFile);
  7.                 exit;