Difference between #25 and #26 of
Yii v2 snippet guide II

Revision #26 has been created by rackycz on Sep 9, 2020, 9:51:40 AM with the memo:

Composer and PhpExcel
« previous (#25) next (#27) »

Changes

Title unchanged

Yii v2 snippet guide II

Category unchanged

Tutorials

Yii version unchanged

2.0

Tags unchanged

tutorial,beginner,yii2,snippets

Content changed

[...]
header('Cache-Control: max-age=0');
$writer->save('php://output');
exit();
```

Thanks to [DbCreator](https://forum.yiiframework.com/t/yii2-phpoffice-phpspreadsheet-src-phpspreadsheet-shared-ole-pps-root-php-on-line-292-headers-already-sent/126617) for the idea how to send XLSX to
the browser. Nevertheless exit() or die() should not be called. Read the link.

Following is my idea which originates from method renderPhpFile() from Yii2:

```php
ob_start();
[...]
4 0
3 followers
Viewed: 75 361 times
Version: 2.0
Category: Tutorials
Written by: rackycz
Last updated by: rackycz
Created on: Aug 26, 2020
Last updated: 3 years ago
Update Article

Revisions

View all history