Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 7102 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 7102 Rev 7104
Línea 552... Línea 552...
552
    }
552
    }
Línea 553... Línea 553...
553
 
553
 
554
 
554
 
555
    public function csvRender($surveyForm, $surveyTests, $survey)
-
 
556
    {
-
 
557
        $tmpName = tempnam(sys_get_temp_dir(), 'data');
555
    public function csvRender($surveyForm, $surveyTests, $survey)
Línea 558... Línea 556...
558
        $tmp = fopen($tmpName, 'w');
556
    {
559
        $sections = json_decode($surveyForm->content, true);
557
        $sections = json_decode($surveyForm->content, true);
Línea 652... Línea 650...
652
            }
650
            }
Línea 653... Línea 651...
653
 
651
 
Línea 654... Línea -...
654
            
-
 
655
        }
-
 
656
 
-
 
657
 
652
            
658
        fclose($tmp);
653
        }
659
 
654
 
660
        header('Content-Description: File Transfer');
655
        header('Content-Description: File Transfer');
661
        header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
656
        header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
662
        header('Content-Disposition: attachment; filename=report.xls');
657
        header('Content-Disposition: attachment; filename=report.xls');
663
        header('Content-Transfer-Encoding: binary');
658
        header('Content-Transfer-Encoding: binary');
664
        header('Expires: 0');
-
 
Línea 665... Línea 659...
665
        header('Cache-Control: must-revalidate');
659
        header('Expires: 0');
Línea 666... Línea 660...
666
        header('Pragma: public');
660
        header('Cache-Control: must-revalidate');
667
      //  header('Content-Length: ' . filesize($tmpName));
661
        header('Pragma: public');
668
 
662
 
669
        $writer = new Xlsx($spreadsheet);
-
 
670
 
-
 
671
        ob_clean();
663
        $writer = new Xlsx($spreadsheet);
672
        flush();
664
 
673
        $writer->save('php://output');
665
        ob_clean();
674
        // readfile($tmpName);
666
        flush();