jmurch Posted April 9, 2007 Share Posted April 9, 2007 Hi All, I am using the following to generate an xml doc to the users browser: $fp = fopen("document.xml", 'w+'); $str = ($xml_frame->Fields('top_xml').$content->Fields('xml').$content->Fields('xml').$xml_frame->Fields('bottom_xml')); fwrite($fp, $str); fclose($fp); header( 'Location: https://www.website.com/document.xml') ; There are two issues about this I'm having trouble with: 1: I would like to delete 'document.xml' after it has been loaded to the user's browser but unlinking the file kills it before it loads and sleep hangs everything. I there a way to detect when it's finished downloading to the user? 2: Directory permissions have to be higher than I'll accept. The solution will not work unless the user is 777. Thanks Link to comment https://forums.phpfreaks.com/topic/46264-solved-permission-help/ Share on other sites More sharing options...
clown[NOR] Posted April 9, 2007 Share Posted April 9, 2007 the first one i have no idea about... but the second one... if you're talking about getting php to chmod your file just use chmod() Link to comment https://forums.phpfreaks.com/topic/46264-solved-permission-help/#findComment-225027 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.