Jump to content

SimpleXML Problem $_POST['data']


Andieuk

Recommended Posts

I'm pretty new to this thing called XML so I have scratched my head a bit.

 

My users are to paste a xml string in to a form for processing, my problem is that when I load the xml direct from a file data.xml on the server using

$xml = simplexml_load_file('data.xml']);

My data is parsed fine and all works well. When I try to use the same xml posted via a form $_POST['data'] I get an error I/O warning : failed to load external entity.The 2 code snippets I have tried to use are below

$xml = simplexml_load_file($_POST['RaidString']);
$xml = simplexml_load_string($_POST['RaidString']);

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/164489-simplexml-problem-_postdata/
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.