Forum und email

disk_total_space

(PHP 4 >= 4.0.7, PHP 5)

disk_total_space — Returns the total size of a directory

설명

float disk_total_space ( string $directory )

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

매개변수

directory

A directory of the filesystem or disk partition.

반환값

Returns the total number of bytes as a float.

예제

Example#1 disk_total_space() example

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

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

주의

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