Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#17 windows disk_free_space error

open
nobody
General (8)
5
2008-06-12
2008-06-12
Anonymous
No

In version 2.3.2, fun_list.php contains a line that captures free drive space:
$free=parse_file_size(disk_free_space(get_abs_dir($dir)));

This method fails in Windows with this message:
(
Warning: disk_free_space() [function.disk-free-space]: The system cannot find the path specified. in W:\...\.include\fun_list.php on line 390
Free: -)

Apparently this function in Windows will only accept a drive letter, so the following works (but is not dynamic):
$free=parse_file_size(disk_free_space("W:"));

Discussion