PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I am looking for a way to write code to a file, and I have found the fwrite method but to use that I have to change the file permissions to 666, is there any other method that lets me keep the permissions the same, in this case 644.
but the reason I can't use fwrite is because for some reason the server sees the script's owner as being different than the owner of the file I am trying to write to so I have to change the permissions to let the "world" edit it, and for the same reason chmod() won't work
If chown is not available, depending on how the files were placed, one may need to upload (or originally write them) via PHP. This way they will share PHP's user.
So, if I am understanding you right, since I am on a shared server it isn't possible to edit a file without changing the permissions of the file I am trying to edit. Is that right or did I miss something cause that seems like something that should be possible?
I've never heard of that, but if you mean Sudo as in http://www.gratisoft.us/sudo/, I don't think will work because I'm not the system administrator, I use a hosting service so I don't think I can set that up
If it's that terribly important, putting the document outside of the document root should add a layer of security.
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.