PHP mkdir() 함수
❮ PHP 파일 시스템 참조예시
"test"라는 디렉터리를 만듭니다.
<?php
mkdir("test");
?>
정의 및 사용
mkdir() 함수는 경로 이름으로 지정된 디렉토리를 생성합니다.
통사론
mkdir(path, mode, recursive, context)
매개변수 값
Parameter | Description |
---|---|
path | Required. Specifies the directory path to create |
mode | Optional. Specifies permissions. By default, the mode is 0777 (widest possible access). Note: The mode parameters is ignored on Windows platforms! The mode parameter consists of four numbers:
Possible values (to set multiple permissions, add up the following numbers):
|
recursive | Optional. Specifies if the recursive mode is set (added in PHP 5) |
context | Optional. Specifies the context of the file handle. Context is a set of options that can modify the behavior of a stream (added in PHP 5) |
기술적 세부 사항
반환 값: | 성공하면 TRUE, 실패하면 FALSE |
---|---|
PHP 버전: | 4.0+ |
❮ PHP 파일 시스템 참조