how to use SetContentType()?

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
Wiedmann
Forum Members
Forum Members
Posts: 233
Joined: Wed Mar 26, 2008 1:49 am
Location: Stuttgart / Germany

how to use SetContentType()?

Post by Wiedmann »

Hello,

just a question about SetContentType() in "class.module.inc.php".

What I doing at the moment:

I have a file "action.bar.php" for my module..
In this action I set SetContenType to something and output some data

Now  call this  module action withe.g.  this link:
http://example.com/index.php?mact=Foo,c ... d=1&page=1

The result is:
- in "index.php" line 294 header() is using my 'content-type' which I have set in my action.
- I get the expected data in my browser (echo $html; line ~296).

But now there is some additional output (line ~309,311) which corrupt my data, because it's not valid for my 'content-type'.

Is the method SetContentType() designed for some other usage?

Regards,
Carsten
Post Reply

Return to “Developers Discussion”