PHP Create folder and cannot create folder cause workaround _php Tutorial

Source: Internet
Author: User
First, how can not create permissions to set the directory a disk 0777 can be, with the program to change the directory permissions with chmod two, with FTP three, with the server permissions to do better,

PHP Tutorial Creating folders and unable to create folders cause workaround
Create a directory in PHP we'll use the mkdir () function to create the directory
*/

$dir = "abc";
if (mkdir ($dir, 0777))
{
echo ' directory '. $dir. ' Successfully created ';
}
Else
{
Echo ' failed to create directory, please check permissions ';
}

/*

mkdir Function Description
mkdir (Path,mode,recursive,context)
Path is required. The name of the directory that was created.
Mode required. The default is 0777.
Recursive required. Sets the recursive mode.
Context required. Specifies the environment for file handles.

mkdir related examples
Http://www.bkjia.com/phper/24/mkdir-05.htm


Unable to create folder reason analysis

First, how can not create permissions to set the directory a disk 0777 can be, with the program to change the directory permissions with chmod
Second, with the FTP
Third, the use of server permissions is better done,

Umask is 0777 when, of course, the use of their own hands chmod change not on the line

chmod function Description
chmod (File,mode)

Such as:

chmod ("/somedir/somefile", 0755);

chmod related examples
Http://www.bkjia.com/phper/24/chmod-php.htm
Http://www.bkjia.com/phper/24/ad7d09f46fce96a82f06fe711adeb47b.htm


http://www.bkjia.com/PHPjc/444934.html www.bkjia.com true http://www.bkjia.com/PHPjc/444934.html techarticle first, how can not create permissions to set the directory a disk 0777 can be, with the program to change the directory permissions with chmod two, with FTP three, with the server permissions to do better, PHP tutorial create files ...

  • 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.