content-type:text/htm

From: Date: Mon, 12 Jun 2000 16:53:20 +0000
Subject: content-type:text/htm
Groups: php.windows 
Request: Send a blank email to php-windows+get-408@lists.php.net to get a copy of this message
> I tried this and telnet simply showed me the html code for my page and it > goes like this... > ------- > Content-type:text/html > blah blah... > ------- > and I couldn't get out of it, can you guess the error from this??? >You didn't quote the most important part, which is the part before the >Content-type header. I would expect to see: > > GET / HTTP/1.0 > > HTTP/1.0 200 OK > Server: <name of your web server> > Date: Sat, 10 Jun 2000 17:19:14 GMT > X-Powered-By: <your PHP version> > Content-type: text/html > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> > <html> > <head> rest of your page etc... >The Content-type line should be together with the other headers, and there >should be a single blank line between them and the page itself. The only >thing that would cause the browser to display the Content-type header would >be if there were a blank line before it, in which case it would be >interpreted as part of the page, not part of the header block. >Others have found that if PHP4 is misconfigured it outputs an error message >right at the start, including a blank line, moving the Content-type header >down into the page body. Ok, I tried it exatly the way you told and got the following output... ------------ HTTP/1.1 200 OK Date:Mon, 12 Jun 2000 16:45:47 GMT Server:Apache/1.3.12 (Win32) Connection:close Content-type:text-html Content-type:text-html hello world. ------------

« previous php.windows (#408) next »