Mute Posted November 24, 2006 Share Posted November 24, 2006 Hi,I'm trying to rename a temporary file I've created but it doesn't work. Says the file doesn't exist. When I do a file_exists() on the file, it also says it doesn't exist. Yet I can see the file on the server....Any ideas? Link to comment https://forums.phpfreaks.com/topic/28287-rename/ Share on other sites More sharing options...
trq Posted November 24, 2006 Share Posted November 24, 2006 Post your code! Link to comment https://forums.phpfreaks.com/topic/28287-rename/#findComment-129352 Share on other sites More sharing options...
Mute Posted November 24, 2006 Author Share Posted November 24, 2006 //create temp file$tmp = time().".xml";$handle = fopen($tmp, "w");fwrite($handle, "data goes here");fclose($handle);//rename temp filerename($tmp, "data.xml"); Link to comment https://forums.phpfreaks.com/topic/28287-rename/#findComment-129362 Share on other sites More sharing options...
JasonLewis Posted November 24, 2006 Share Posted November 24, 2006 are you accessing it properly, is the file in the same folder as the script you are running? Link to comment https://forums.phpfreaks.com/topic/28287-rename/#findComment-129487 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.