How to override the http content-type header in cmsms 1.10?

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
deactivated010521

How to override the http content-type header in cmsms 1.10?

Post by deactivated010521 »

----------
Last edited by deactivated010521 on Tue Mar 12, 2013 5:51 pm, edited 1 time in total.
zaidcrowe
Forum Members
Forum Members
Posts: 109
Joined: Wed Jun 10, 2009 3:43 pm

Re: How to override the http content-type header in cmsms 1.

Post by zaidcrowe »

hey - did you have any luck with a solution for this?
zaidcrowe
Forum Members
Forum Members
Posts: 109
Joined: Wed Jun 10, 2009 3:43 pm

Re: How to override the http content-type header in cmsms 1.

Post by zaidcrowe »

for anyone interested - the only thing i found that could help me right now (as of 1.10.3) is something I borrowed for the CMSPrinting module:

// kill any output that may have happened already.
$handlers = ob_list_handlers();
for ($cnt = 0; $cnt < sizeof($handlers); $cnt++) { ob_end_clean(); }
header("Content-Type: application/json");

----
Some pretty creative code - filthy, but creative :O)
Post Reply

Return to “Developers Discussion”