Forum Moderators: coopster

Message Too Old, No Replies

conteg and adding your own custom headers in code

How do you add your own headers into the headers that conteg creates?

         

irix

3:27 pm on Apr 24, 2008 (gmt 0)

10+ Year Member



Hi,

Im attempting to implement conteg 0.13 and im running into a problem.

I have psuedo PHP code as follows

ob_start;
include conteg file;
setup conteg parms;

header('P3P: policyref="/w3c/p3p.xml", CP="ALL DSP COR CURa CONi OUR STP"');

$contegclass->show();

The contegclass->show function keeps bombing out because it does not like me to have setup a header before it is called.

The error in the logs is as follows:

PHP Warning: Conteg::show(): Cannot print; headers already sent. in #*$!#*$!x etc.

Im very new to using conteg, but i've googled around and i cant find any references to this situation. How do i insert additional headers into browser output? Or should i do it after the show command is sent?

irix

3:42 pm on Apr 24, 2008 (gmt 0)

10+ Year Member



Sorry to post a reply to my own question - but its still not working and i've noticed something else.

Im using the SMARTY template engine, and if i take out all the code to generate my own custom headers and just use Conteg, it seems that im still getting headers. Does SMARTY itself generate any headers? Just curious to see if anyone has used SMARTY and Conteg together. I've googled around but i dont seem to find any postings mentioning this combination.