kaplanyo Posted September 5, 2009 Share Posted September 5, 2009 Hi, I have what I think is a good system for generating XML from PHP. The PHP scripts run and dynamically generate some XML. So I get XML output from a PHP file. What I'd like to do what I think of as 'publishing' the XML file, or creating an actual .XML file from the PHP. Is there function in PHP that would allow me write a file? PHP file > script runs > makes an actual .XML file. I'm loading this XML into Flash and trying to optimize the loading, sometimes it seems like the dynamically generated XML takes a few seconds to get created by the PHP, sometimes it's fast (non-cached). I thought it might be better to load the XML from a 'static' XML file that I generated with my PHP script. Any push in the right direction would be great, thanks. Dave Link to comment https://forums.phpfreaks.com/topic/173266-solved-can-i-use-php-to-write-an-actual-xml-file/ Share on other sites More sharing options...
bundyxc Posted September 5, 2009 Share Posted September 5, 2009 Might want to take a look at fwrite. Link to comment https://forums.phpfreaks.com/topic/173266-solved-can-i-use-php-to-write-an-actual-xml-file/#findComment-913315 Share on other sites More sharing options...
Mark Baker Posted September 5, 2009 Share Posted September 5, 2009 XMLWriter if you're running 5.1.2 or above; or DOM Link to comment https://forums.phpfreaks.com/topic/173266-solved-can-i-use-php-to-write-an-actual-xml-file/#findComment-913317 Share on other sites More sharing options...
kratsg Posted September 5, 2009 Share Posted September 5, 2009 I suggest looking at this tutorial :-) http://www.phpfreaks.com/tutorial/handling-xml-data Link to comment https://forums.phpfreaks.com/topic/173266-solved-can-i-use-php-to-write-an-actual-xml-file/#findComment-913345 Share on other sites More sharing options...
BloodyMind Posted September 6, 2009 Share Posted September 6, 2009 sure you can, take a look at this: http://fr.php.net/manual/en/class.domdocument.php so useful Link to comment https://forums.phpfreaks.com/topic/173266-solved-can-i-use-php-to-write-an-actual-xml-file/#findComment-913477 Share on other sites More sharing options...
kaplanyo Posted September 6, 2009 Author Share Posted September 6, 2009 Thanks guys!!!!! Link to comment https://forums.phpfreaks.com/topic/173266-solved-can-i-use-php-to-write-an-actual-xml-file/#findComment-913571 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.