Re: HTML source of a php outputted document?
| From: | Jason Brooke | Date: | Mon, 10 Jul 2000 13:46:38 +0000 |
| Subject: | Re: HTML source of a php outputted document? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-5716@lists.php.net to get a copy of this message | ||
<?
$blah = file("http://www.your.host/yourfile.php");
$s = count($blah);
echo "<plaintext>\n";
for($i=0 ; $i<$s ; $i++)
echo $blah[$i];
echo "</plaintext>\n";
?>
jason
> This is a real newbie HTML question, but I just wanted to know before I
> start to double my work by writing the same thing in two files all the
> time:
>
> I want to display some sample HTML source of a web page that's php3
> generated, i.e. not show the php3 source but the html source it
> generates. The tricky part is that I want to do this on a web page.
>
> A horrible solution would be to call a function for each < and >, and if
> $source is defined output < and > in their place... won't make the
> code any prettier though. ;)
>
> Are there any more elegant solutions?