Re: output htmkl file as text
| From: | Curt Zirzow | Date: | Thu, 28 Oct 2004 05:14:33 +0000 |
| Subject: | Re: output htmkl file as text | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-200517@lists.php.net to get a copy of this message | ||
* Thus wrote Jerry Swanson:
> I want to output html file on the screen like text not like html file.
> I want a program to read html file and output source code to the screen.
>
> Any ideas how to fake browser, so browser will print html tags on the screen?
By default php will send a header:
Content-Type: text/html; charset=iso-8859-1
To the browser, so it will render the contents as html.
You can override that by using the header() function sending:
Content-Type: text/plain; charset=iso-8859-1
Then you can display html and the html will get displayed as if you
were looking at it in notepad.
Curt
--
Quoth the Raven, "Nevermore."