naren
naren

Reputation: 11

in local PHPExcel save() working fine, but in server not creating xls file?

$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');

$objWriter->save("test.xls");

PHPExcel save() not working in server ?

but working fine local machine?

anything i am missing?

Upvotes: 0

Views: 8304

Answers (2)

Sunny Kalariya
Sunny Kalariya

Reputation: 346

Just Use ob_end_clean() function before $objWriter->save("test.xls");

$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
ob_end_clean();
$objWriter->save("test.xls");

Upvotes: 0

Cas Wolters
Cas Wolters

Reputation: 371

Are the rights on the folder you are writing to sufficient enough to create or modify files? Use CHMOD to change the rights.

When using error_reporting(E_ALL) are there any errors or warnings? Production servers often have display_errors set to off, turn it on by using ini_set("display_errors", "on") to display them for your test file.

Upvotes: 1

Related Questions