Joomla's Non-standard Output Header

Technorati Tags: ,,,

As we all know, all joomla's output mainly grouped into 4: HTML, PDF, Feed, RAW. What about if I'd like to output anything else directly from Joomla? You just have to die();

Every output in Joomla will have extra HTML elements, for now I use this trick: Output all header that you need, print out your content and finally before Joomla get in the way, execute die(). This solves my problem.

For example, try to do this in model. Since in model is where you put your data[base] management:

header("Content-type: application/x-msdownload");
header("Content-Disposition: attachment; filename=MyFile.xls");
header("Pragma: no-cache");
header("Expires: 0");
die();

I still think this is not the right way, untill then, enjoy this..

Tidak ada komentar:

2018: Tahun Baru Motivasi Baru

Tahun Baru 2017 sudah lewat, sekarang sudah 2018. Tahun berganti seperti yang sudah-sudah, setahun lagi juga akan berganti menjadi 2019. ...