A message for Linux.com registered users: We are in the process of making changes to the Linux forums. Starting Monday, 8/13/18 at 6:00 PM PT, you will be unable to access the forums. They will re-launch as soon as possible on Wednesday, 8/15/18 with new features and improved functionality. Thank you for your patience and stay tuned for the new improved forums.

January 24, 2012

PHP

Forums: 

I know this is not a Linux question, but this is still the smartest Group I know.

I made the simplest XML file I can contrive.

<? xml version 1.0 ?>

note

yes it is at the very top of the file.

Now I'm trying to pull it into my PHP.


$feat = new SimpleXMLElement(file_get_contents("main.xml"));

I've checked letter by letter, I don't see anything wrong in my code. permitions are correct in file and folder. what else would cause errors reading this in?

Click Here!