Jump to content

RSS script header problem


art15

Recommended Posts

I have an RSS script which is reading the information from the database, the script declares the header at the start of the document which looks like this:

 

header("Content-Type: text/xml");

 

If I have this line in my document, I get the error as XML Parsing Error: xml declaration not at start of external entity

Location: http://www.abc.com/rss.php

Line Number 2, Column 1:<?xml version="1.0"?>

^

 

If I comment this line, the script pulls up the information correctly but then it is not formatted correctly and is not being read by rss reader when you open it.

 

I have been trying to fix it but has no luck

 

Thanks.

Link to comment
https://forums.phpfreaks.com/topic/119237-rss-script-header-problem/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.