File Directory write error
I use PHP to create a folder. Set 0777 permissions. Write file with file_put_content error:
Failed to open Stream:permission denied '
1, the first thought is the authority problem, I use the function to determine whether the folder created has writable permissions. I created the test.txt test and can succeed.
It is also strange that the program to write more than 10 files are successful, but write to a file on the error. If there is no writable permission, it should be a file is not created success is AH.
2, the path is correct, this check many times.
Besides, I can't think of any other possibilities. Trouble master to point out, thank you.
Share to:
------Solution--------------------
Is_writable--Determines whether a given file name can be written
------Solution--------------------
Naming problems? If it is written to a file, there is only one or a regular number, or scattered, these are to try
------Solution--------------------
Reference:
Quote: Reference:
Naming problems? If it is written to a file, there is only one or a regular number, or scattered, these are to try
Scattered. Sometimes the error occurs on the run, and sometimes the 5th and 11th are possible.
The length of the whole file path, try the segment path, if not, change the machine try-if not yet, suggest to abandon the original DZ forum documents, write a