Php creates a folder and cannot create a folder. 1. how can I create a 0777 disk with the permission to set the directory? use the program to change the directory permission. use chmod 2, use ftp 3, and use the server permission, php Tutorial file creation 1. how can I create a 0777 disk with the permission to set the directory, use chmod to change the directory permissions with the program. use ftp. use server permissions,
Php Tutorial: creating folders and creating folders
To create a directory in php, we will use the mkdir () function to create a directory.
*/
$ Dir = "abc ";
If (mkdir ($ dir, 0777 ))
{
Echo 'directory '. $ dir. 'created successfully ';
}
Else
{
Echo 'failed to create directory. Please check authorization ';
}
/*
Mkdir function description
Mkdir (path, mode, recursive, context)
Path is required. The name of the created directory.
Mode is required. The default value is 0777.
Recursive is required. Set the recursive mode.
Context is required. Specifies the file handle environment.
Mkdir-related instances
Http://www.bkjia.com/phper/24/mkdir-05.htm
Unable to create folder cause analysis
1. how can I create a 0777 disk with the permission to set a directory? use chmod to change the directory permission in a program.
II. use ftp
3. it is better to use server permissions,
This is certainly the case when umask is 0777. you just need to manually use chmod to change it.
Chmod function description
Chmod (file, mode)
For example:
Chmod ("/somedir/somefile", 0755 );
Chmod instances
Http://www.bkjia.com/phper/24/chmod-php.htm
Http://www.bkjia.com/phper/24/ad7d09f46fce96a82f06fe711adeb47b.htm
Tutorial, php Tutorial to create a file...