johnny22 Posted October 9, 2007 Share Posted October 9, 2007 Hi, I made a small script that logs my blog's visitors. Here it is: $file = fopen("log.txt", "a"); fputs ($file, "$ip, $host\r\n"); fclose ($file); I CHMODed the file log.txt to 0777 and it's working. But is it correct? I mean which CHMOD do I have to set for log.txt? Please help me! Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/72407-i-need-help-with-chmod-and-file-writing/ Share on other sites More sharing options...
sKunKbad Posted October 9, 2007 Share Posted October 9, 2007 Is your question, "what file permission value is necessary for my script to write to log.txt"? Quote Link to comment https://forums.phpfreaks.com/topic/72407-i-need-help-with-chmod-and-file-writing/#findComment-365166 Share on other sites More sharing options...
johnny22 Posted October 9, 2007 Author Share Posted October 9, 2007 Is your question, "what file permission value is necessary for my script to write to log.txt"? Yes, file permission value to both log.txt and log.php... Quote Link to comment https://forums.phpfreaks.com/topic/72407-i-need-help-with-chmod-and-file-writing/#findComment-365171 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.