php cannot create folder

藏色散人
Release: 2023-02-25 18:42:01
Original
4522 people have browsed it

php cannot create folder

php cannot create the folder?

Upload, folder creation failed:

php cannot create folder

Check the function description in the official PHP documentation:

php cannot create folder

mode has been specified as: 0777. Why is it still reporting an error saying that it does not have permission? ?

After carefully reading the document, I found that this involves a recursive mode, and the directories that may be created exist in multi-level directories. The current directory to be created in the project: 20160704, it should be in the online/thum/img folder:

php cannot create folder

So, add the third parameter to the mkdir function to open Recursive mode:

Example: mkdir($uploadpath,0777,true);

php cannot create folder

Upload the image again, successful! !

php cannot create folder

For more PHP knowledge, please visit PHP Chinese website!

The above is the detailed content of php cannot create folder. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template