Re: view xml thru php

From: Date: Wed, 23 Jun 2004 14:42:16 +0000
Subject: Re: view xml thru php
Groups: php.windows 
Request: Send a blank email to php-windows+get-24058@lists.php.net to get a copy of this message
The raw xml. I tried header("Location: $file"); but its not working in IE. NN works fine. http://www.lokalguiden.se/tv4/texttv.php Any ideas? "Jason Barnett" <jasbarne@indiana.edu> skrev i meddelandet news:<20040623142851.82997.qmail@pb1.pair.com>... > 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 (#24058) next »