Link to this post 24 Jan 12

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 ?>

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?

Link to this post 03 May 12

what is the error? you might want to turn on error reporting with:
in your php script before loading the xml file.

Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Linux Training / Board