PHP Create folder

Source: Internet
Author: User

1 $dir=Iconv("UTF-8", "GBK", "Public/bookcover");2         if(!file_exists($dir)){3             mkdir($dir, 0777,true);4             Echo' Create folder bookcover success ';5}Else {6             Echo' The folder to be created bookcover already exists ';7}

Iconv method is to prevent Chinese garbled, to ensure that you can create a recognized Chinese directory, without the Iconv method format, you will not be able to create a Chinese directory

The first parameter of the MkDir method is the directory path to be created, the second parameter is the permission to create the directory, the parameter is ignored under Windows system, and the third parameter is whether to create a multilevel directory, the default is False

PHP Create folder

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.