파일시스템 함수 목록
PHP Manual

disk_free_space

(PHP 4 >= 4.1.0, PHP 5)

disk_free_spaceReturns available space in directory

설명

float disk_free_space ( string $directory )

Given a string containing a directory, this function will return the number of bytes available on the corresponding filesystem or disk partition.

인수

directory

A directory of the filesystem or disk partition.

Note: Given a file name instead of a directory, the behaviour of the function is unspecified and may differ between operating systems and PHP versions.

반환값

Returns the number of available bytes as a float.

예제

Example #1 disk_free_space() example

<?php
// $df contains the number of bytes available on "/"
$df disk_free_space("/");

// On Windows:
disk_free_space("C:");
disk_free_space("D:");
?>

주의

Note: 이 함수는 원격 파일을 다루지 못합니다. 파일은 서버 파일시스템을 통해서 사용 가능해야만 합니다.

참고


파일시스템 함수 목록
PHP Manual