Re: Echoed Status and Content-type Problem

From: Date: Fri, 09 Mar 2001 14:43:17 +0000
Subject: Re: Echoed Status and Content-type Problem
References: 1 2 3  Groups: php.windows 
Request: Send a blank email to php-windows+get-5909@lists.php.net to get a copy of this message
> > Because script redir.php3 must not have header command... Same header is > > generated by web server. Thus browser really receives such header twice - > > first used to control page contents and second one become page contents. > If > > you will check page contents you will find this header before <html> > tag... > > > > Vladimir, > > Not quite true but close. In PHP you can send the header if you want. You > don't have to but you can. However, in this case it doesn't seem to be > working right. I have many other PHP scripts with the same line of code and > it works fine. I just can't figure out why not here. > > Chuck Sorry... I'm slightly sleepy and it's hard for me to explain what I exactly mean now... :) When Apache starts script on server it expect content-type header from script. If script will return something else which Apache cannot understand then you will get error from Apache. So your script actually generate this header twice. See for yourself by running this script from shell - you will get two headers instead of one. Vladimir

« previous php.windows (#5909) next »