sc00tz1 Posted March 28, 2013 Share Posted March 28, 2013 I'm a complete noob here, but if I have a file executing that is using fopen function (opening file, editing, then closing) on a .php file that other browsers are looking at, what will they see if they access the .php file while fopen is being executed (by cron job on my server) on it? Will the page break? The file being edited and viewed by other browsers is mostly html Any help would be greatly appreciated. Thanks Quote Link to comment https://forums.phpfreaks.com/topic/276246-fopen-question/ Share on other sites More sharing options...
requinix Posted March 28, 2013 Share Posted March 28, 2013 Potentially, depending what you're doing with it. Why are you editing a .php file with code? Quote Link to comment https://forums.phpfreaks.com/topic/276246-fopen-question/#findComment-1421563 Share on other sites More sharing options...
ulferik Posted March 28, 2013 Share Posted March 28, 2013 I'd suggest to construct the new contents of the file and store it with a temporary filename, and only switch it over to the real name when it's finished. Quote Link to comment https://forums.phpfreaks.com/topic/276246-fopen-question/#findComment-1421576 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.