PHPReport:致命错误:未捕获异常:无法关闭zip文件

时间:2016-08-22 13:51:53

标签: php codeigniter phpexcel

我是gettingerror"无法关闭zip文件.."并意识到它没有权限写入该目录。 在这里我的代码:

    $template = 'myexcel1.xls';
    //set absolute path to directory with template files
    $templateDir = __DIR__ . "/../controllers/";

    //set config for report
    $config = array(
    'template' => $template,
    'templateDir' => $templateDir
    );


    //load template
    $R = new PHPReport($config);
  //  print_r($R); die();
    $R->load(array(
        'id' => 'scenario_input',
        'repeat' => TRUE,
        'data' => $data   
        )
    );
   // print_r($R); die();
    // define output directoy 
    $output_file_dir = 'opt/lampp/htdocs/randema/';

    $output_file_excel = $output_file_dir  . 'Myexcel1.xls';
    //download excel sheet with data in /tmp folder
    $result = $R->render('excel', $output_file_excel);

0 个答案:

没有答案
相关问题