mikefrederick Posted May 26, 2008 Share Posted May 26, 2008 I am writing an xml file using php. The top of the file starts sets a database connection and then specifies the content type as xml. This is fine...and I have been able to write the entire file as xml. But in a different file I need to urlencode the contents of the file. I tried using urlencode(file_get_contents($file)) but the actual php lines within the xml file are showing up, I just want the xml document as it would be shown a browser. How shoud I do this? Link to comment https://forums.phpfreaks.com/topic/107352-writing-xml-using-php-and-then-reading-it/ Share on other sites More sharing options...
BlueSkyIS Posted May 26, 2008 Share Posted May 26, 2008 i guess i would try skipping x number of lines in the file, or using http://www.somewhere.com/yourxmlphpfile.php to access the file so it is parsed first. Link to comment https://forums.phpfreaks.com/topic/107352-writing-xml-using-php-and-then-reading-it/#findComment-550397 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.