On Sat, 10 Jan 2004 17:44:18 +0100 (MET), you wrote:

>I have a problem setting my headers right with php running as .cgi. I
>have to specify a Content-type for the cgi file to work. But how
>should I do both that and start a session?
>
>I have a few options:
>
>#! /usr/local/bin/php
><?php
>    session_start();
>    print 'Content-type: text/html' . "\n\n";
>
>This way $_SESSION['count'] stays unset even though I say
>$_SESSION['count'] = 1; in my program.
>
>To swap the two lines won't work because I heard \n\n terminates the
>header portion. Anyway, here goes:

Stupid question: Have you tried

header ('Content-type: text/html');

I'm pretty sure it will work.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to