[thelist] [XML] PHP creation of XML.. not starting at top of page..?

Tris beertastic at gmail.com
Tue May 20 10:35:31 CDT 2008

<?php header('Content-type: text/xml'); is there...
I used Kens object clean code..
worked a treat!!!

Live and learn!

that ones going in my code respository..!!


2008/5/20 Mark Groen <evolt at markgroen.com>:
> On Tuesday 20 May 2008 06:05:47 Nan Harbison wrote:
>> Tris,
>> There is an error message on the page, so we can't see what you are talking
>> about.
> -----------
>> So I can see that there's a line, but if I remove that line to give:
>> ?><?=$showXml ?>
>> there's still 3 spaces that appear tio be invalid.
> That error message shows the problem: it's not valid xml - "<?xml" must be the
> first characters encountered in the newly created file. Guessing that at the
> _very_top_ of your php code there is this line missing:
> <?php header('Content-type: text/xml');
> If that doesn't work, would need to see more of your code.
> Just a heads up too, using "short tags" (<?) instead of <?php can run you into
> trouble down the road if using Apache/PHP, short tags are not the default and
> if moving your code to a different server your program may break.
> --
> cheers,
>        Mark
> --
> --
> * * Please support the community that supports you.  * *
> http://evolt.org/help_support_evolt/
> For unsubscribe and other options, including the Tip Harvester
> and archives of thelist go to: http://lists.evolt.org
> Workers of the Web, evolt !

"The only people who don't make mistakes are those who don't do anything"

Give a man a fish and he'll feed himself for a day.
Give a man a religion and he'll starve to death praying for a fish.

`We are what we pretend to be, so we must be careful what we pretend to be.`
Kurt Vonnegut

`When a person can no longer laugh at himself, it is time for others
to laugh at him.`
Thomas Szasz

More information about the thelist mailing list