File directory write down the error

Source: Internet
Author: User
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
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.