Hi all,
I'm trying to write a simple script that writes text files to a given folder and then reads them, modifies them and writes them again. I gave read and write permission to the server folder where these files need to be created. The PHP script creates the files using fopen(), but the created files have neither read nor write permissions. So then a subsequent fopen() doesn't open them. It is very strange, if you check for file_exists() it says file exists, but you cannot open it, and I suppose it is because it doesn't have any permissions. If I go to control panel and manually assign the read permission, the php script can read the file ok.
How can I get php to automatically create these files with read and write permission??
Thanks!