利用可能なスペースを調べる
■ 利用可能なスペースを調べる
disk_free_space関数は、指定したディレクトリに対応するファイルシステムまたはパーテーションで利用可能なサイズをバイトで返します。 数値 = disk_free_space (ディレクトリ) また、disk_total_system関数を使うと、ファイルシステムまたはパーティション全体のサイズを調べることができます。 数値 = disk_total_space (ディレクトリ) <?php $free = number_format(disk_free_space(".")); $total = number_format(disk_total_space(".")); header("Content-Type: text/plain; charset=EUC-JP"); printf("空き:%sバイト\n", $free); printf("全体:%sバイト\n", $total); ?> <戻る
disk_free_space関数は、指定したディレクトリに対応するファイルシステムまたはパーテーションで利用可能なサイズをバイトで返します。
数値 = disk_free_space (ディレクトリ)
また、disk_total_system関数を使うと、ファイルシステムまたはパーティション全体のサイズを調べることができます。
数値 = disk_total_space (ディレクトリ) <?php $free = number_format(disk_free_space(".")); $total = number_format(disk_total_space(".")); header("Content-Type: text/plain; charset=EUC-JP"); printf("空き:%sバイト\n", $free); printf("全体:%sバイト\n", $total); ?>
数値 = disk_total_space (ディレクトリ)
<?php $free = number_format(disk_free_space(".")); $total = number_format(disk_total_space(".")); header("Content-Type: text/plain; charset=EUC-JP"); printf("空き:%sバイト\n", $free); printf("全体:%sバイト\n", $total); ?>
<戻る