After already researching this problem I found that it came about from lines of space between code outside of the php tags. However, I have removed all the lines of space i could possibly find, and i am still recieving the error.
Can somebody see what I'm doing wrong here? sorry if its an easy, fix; I'm a bit of a php newbie. Here's the code of the entire page (note there are no spaces within the included css file either):
This error appears to come from your <?XML.... statement at the start of the rss file, not your <?PHP statement. Did you intend on echoing the RSS to the browser, or are you trying to make a file from it?
The error you are seeing is not a PHP error. It is a client-side error from your browser trying to interpret the output you are sending to it. To reiterate, you cannot have an XML document embedded in the middle of a XHTML document. All the RSS generation stuff needs to be in a separate PHP file that only outputs the XML.
If you want that data displayed within your main XHTML document, then you'll need to load the XML by accessing it via a URL (or by including it with output buffering and then dumping the buffer to a variable) and parse/process its output into the desired XHTML output.
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
ok, i have now changed the code, and im getting the error "can't open file", this is becuase the xml file im opening to write wont open, and im not sure why. here's the code, any ideas why it wont work?