Re: view xml thru php

From: Date: Wed, 23 Jun 2004 14:28:47 +0000
Subject: Re: view xml thru php
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-24055@lists.php.net to get a copy of this message
Joakim Ling wrote:
Hi, Im trying to view a xml file (texttv.xml) thru php.
Are you wanting to see the raw xml? You can do it like so: <?php $file = './path/to/file.xml'; header("Location: $file"); ?> Or, are you wanting to have the xml as part of the php script's output? Then you might do this: <?php $file = './path/to/file.xml'; $xml = file_get_contents($file); echo '<pre>'; echo htmlentities($xml); ?>

« previous php.windows (#24055) next »