예제 #1
0
 public function sendToBrowserDownload($filename)
 {
     $this->epilogue();
     $filename = Piwik_ReportRenderer::appendExtension($filename, "html");
     Piwik::overrideCacheControlHeaders();
     header('Content-Description: File Transfer');
     header('Content-Type: text/html');
     header('Content-Disposition: attachment; filename="' . str_replace('"', '\'', basename($filename)) . '";');
     header('Content-Length: ' . strlen($this->rendering));
     echo $this->rendering;
 }
예제 #2
0
 public function sendToBrowserInline($filename)
 {
     $filename = Piwik_ReportRenderer::appendExtension($filename, self::PDF_CONTENT_TYPE);
     $this->TCPDF->Output($filename, 'I');
 }
예제 #3
0
 protected static function sendToBrowser($filename, $extension, $contentType, $content)
 {
     $filename = Piwik_ReportRenderer::appendExtension($filename, $extension);
     Piwik::overrideCacheControlHeaders();
     header('Content-Description: File Transfer');
     header('Content-Type: ' . $contentType);
     header('Content-Disposition: attachment; filename="' . str_replace('"', '\'', basename($filename)) . '";');
     header('Content-Length: ' . strlen($content));
     echo $content;
 }
예제 #4
0
파일: Pdf.php 프로젝트: neolf/PIWIK4MOBILE
 public function sendToBrowserDownload($filename)
 {
     $filename = Piwik_ReportRenderer::appendExtension($filename, "pdf");
     $this->TCPDF->Output($filename, 'D');
 }