Re: file() ignores PHP tags

From: Date: Sun, 23 Sep 2007 14:23:26 +0000
Subject: Re: file() ignores PHP tags
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-262392@lists.php.net to get a copy of this message
"Peter Lauri" wrote:
Your array that you get from the file() will contain the <?php tag, but you will not see it in your browser as it is parsed as html. header("Content-type: text/plain"); ontop of your script will output plain text. Hope it helps.
Hi NG! I wanna output several kinds of ascii files. Two things are bothering me right now: 1. I don`t get the PHP starttag (<?php) in my output, but the ending tags. Is there anything I can to to get all of it? 2. How can I stop the browser to render HTML output, in order to get plain ascii?
Yes, that is a little better. Thanks for that! But now all the PHP is removed. Is there some other header to send, in order to get PHP in my output? -- Kind regards, magoo

« previous php.general (#262392) next »