Example analysis of mkdir function usage in PHP, mkdir instance Analysis _php Tutorial

Source: Internet
Author: User
Tags php programming php sample code

Example analysis of mkdir function usage in PHP, mkdir instance Analysis


This paper analyzes the usage of mkdir function in PHP. Share to everyone for your reference. The specific analysis is as follows:

mkdir () Syntax: bool mkdir (string directory, annotation permissions) dirthe New directory.permissionsoctal number Specifies the permissions of a new directory for the new directory.creates.

mkdir () Creates a directory with the specified permissions, which is the same as the file mode () and fileperms (), and returns False if an error occurs.

The PHP sample code is as follows:
Copy the Code code as follows: <?php
if (mkdir ("temp", 0701))
Print "Directory creation succeeded";
?>
Output: Directory Creation succeeded
Create a directory that has full permissions

Description: mkdir () attempted to create a new directory specified by path.

The default mode is 0777, which means the maximum possible access rights.

Hints and Notes

Note: mode is ignored under Windows, since PHP 4.2.0 as an option, the support for the context is PHP 5.0.0 added, the recursive parameter is PHP 5.0.0 added, the instance code is as follows:
Copy the Code code as follows: <?php mkdir ("testing");? >

I hope this article is helpful to everyone's PHP programming.

http://www.bkjia.com/PHPjc/912288.html www.bkjia.com true http://www.bkjia.com/PHPjc/912288.html techarticle The example analysis of mkdir function usage in PHP, mkdir example analysis the mkdir function usage in PHP in this paper. Share to everyone for your reference. The specific analysis is as follows: mkdir () syntax: bool MKD ...

  • Related Article

    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.