CSmith1128 Posted May 13, 2007 Share Posted May 13, 2007 Hello. I need some help creating text files. I want to set my access rules to 0777 so that I can delete the text file via script if I need to. I already set the folder to 0777 when I created it.. now I just need the text files. How would I set the access to 0777 when I create the file? This is what I have right now... $text= "this is text."; $fileName = "examplefolder1/example.txt; $handle = fopen($fileName, 'w'); fwrite($handle, $text); fclose($handle); Is there some way to do it in that statement? Thanks Chris Quote Link to comment https://forums.phpfreaks.com/topic/51149-need-some-help-creating-text-files/ Share on other sites More sharing options...
trq Posted May 13, 2007 Share Posted May 13, 2007 Take a look at chmod. 0777 has the potential of being very insecure though. Quote Link to comment https://forums.phpfreaks.com/topic/51149-need-some-help-creating-text-files/#findComment-251818 Share on other sites More sharing options...
per1os Posted May 13, 2007 Share Posted May 13, 2007 www.php.net/chmod Quote Link to comment https://forums.phpfreaks.com/topic/51149-need-some-help-creating-text-files/#findComment-251819 Share on other sites More sharing options...
CSmith1128 Posted May 13, 2007 Author Share Posted May 13, 2007 is there another setting I could use that would allow a script to create a file, write to the file, and delete the file? Quote Link to comment https://forums.phpfreaks.com/topic/51149-need-some-help-creating-text-files/#findComment-251820 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.