我正在使用这样的代码
use JasperPHP\JasperPHP as JasperPHP;
$jasper = new JasperPHP;
// Process a Jasper file to PDF and RTF (you can use directly the .jrxml)
$database = Config::get('database.connections.mysql');
$output = public_path() . '/report/'.time().'_codelution';
$file = base_path() .'/storage/reporting/hrm_plan_formation.pdf';
$ext = "pdf";
$bb = $jasper->process(
__DIR__ . '/../../vendor/cossou/jasperphp/examples/hello_world.jasper',
$output,
array("pdf", "rtf"),
array("php_version" => "7.2")
)->output();
的print_r($ BB);
输出显示如下:
C:^^^ \ XAMPP ^^^ \ htdocs中^^^ \站点^^^ \ laravel53 ^^^ \厂商^^^ \ cossou ^^^ \ jasperphp ^^^ \ SRC ^^^ \ JasperPHP /../JasperStarter/bin/jasperstarter进程C:^^^ \ xampp ^^^ \ htdocs ^^^ \ Sites ^^^ \ laravel53 ^^^ \ routes /../../ vendor / cossou / jasperphp / examples / hello_world.jasper -o C:^^^ \ xampp ^^^ \ htdocs ^^^ \ Sites ^^^ \ laravel53 ^^^ \ public / report / 1479887883_codelution -f pdf rtf -r C:^^^ \ XAMPP ^^^ \ htdocs中^^^ \站点^^^ \ laravel53 ^^^ \厂商^^^ \ cossou ^^^ \ jasperphp ^^^ \ SRC ^^^ \ jasperPHP /../../ .. /../../ -P php_version = 7.2
但文件未保存在磁盘中。