ckrudelux Posted November 24, 2010 Share Posted November 24, 2010 trying to use simplexml_load_file() the problem is just that the file is an php file which output is xmlso the file would look something like this: <?php header('Content-type: text/xml; charset=ISO-8859-1');?><?xml version="1.0" encoding="ISO-8859-1"?><note><from><?php echo "Name";?></from><message><?php echo "Message";?></message></note> and end up like this: <?xml version="1.0" encoding="ISO-8859-1"?><note><from>Name</from><message>Message</message></note> Should I try an other method or is this possible but I'm just doing this wrong? Link to comment Share on other sites More sharing options...
boen_robot Posted November 24, 2010 Share Posted November 24, 2010 You could open the file with its "http" path - that way, the PHP is first executed, and you get the output as an input to the PHP file that requested it that way.You could've also generated the XML in a more structured fashion, where you output it only if it's not requested by another file, but that's not as easy to alter when you have an existing file. Link to comment Share on other sites More sharing options...
ckrudelux Posted November 24, 2010 Author Share Posted November 24, 2010 You could open the file with its "http" path - that way, the PHP is first executed, and you get the output as an input to the PHP file that requested it that way.You could've also generated the XML in a more structured fashion, where you output it only if it's not requested by another file, but that's not as easy to alter when you have an existing file.Thanks work a lot better then using the http:// address Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.