Помоему так будет работать:<?php $action = \"\";if(isset($action)){ $ftp = \'wp.dnet\'; $login = \'Anonymous\'; $pass = \'\'; $mera = 2; $ftp_handle = ftp_connect($ftp); if(!@ftp_login($ftp_handle, $login, $pass)) exit(\"Ошибка определения занимаемого объёма\"); $dir = \"/portal_news/soft/\"; $global_size = 0; $global_size = get_ftp_size($ftp_handle, $dir, $global_size); if($mera == 1) $size=ceil(($global_size)/1024).\" КB\"; if($mera == 2) $size=ceil(($global_size)/1024/1024).\" Mб\"; if($mera == 3) $size=round(($global_size)/1024/1024/1024).\" Гб\"; echo \"<b>Soft: $size</b>\"; $dir = \"/portal_news/muzik/\"; $global_size = 0; $global_size = get_ftp_size($ftp_handle, $dir, $global_size); if($mera == 1) $size=ceil(($global_size)/1024).\" КB\"; if($mera == 2) $size=ceil(($global_size)/1024/1024).\" Mб\"; if($mera == 3) $size=round(($global_size)/1024/1024/1024).\" Гб\"; echo \"<b>Soft: $size</b>\"; $dir = \"/portal_news/porno/\"; $global_size = 0; $global_size = get_ftp_size($ftp_handle, $dir, $global_size); if($mera == 1) $size=ceil(($global_size)/1024).\" КB\"; if($mera == 2) $size=ceil(($global_size)/1024/1024).\" Mб\"; if($mera == 3) $size=round(($global_size)/1024/1024/1024).\" Гб\"; echo \"<b>Soft: $size</b>\"; ftp_close($ftp_handle); }function get_ftp_size($ftp_handle, $dir, $global_size) { $file_list = ftp_rawlist($ftp_handle, $dir); if(!empty($file_list)) { foreach($file_list as $file) { list($acc, $bloks, $group, $user, $size, $month, $day, $year, $file) = preg_split(\"/[\\s]+/\", $file); if($acc[0] == \'d\' && $file != \"..\" && $file != \".\") { $dir_new = trim($dir.\"/\".$file,\"/\"); $global_size = get_ftp_size($ftp_handle, $dir_new, $global_size); } else { $global_size += $size; } } } return $global_size; }?>И т.п. Пробуй.