Verfasst: 17.07.2004 14:56
hmm, die Anzahl stimmt nicht ganz... ich habe eigentlich 7 hochgeladene Dateien... es wird aber die leere index.htm mitgezählt... kann man einfach -1 irgendwo einbauen?
phpBB.de - Die deutsche phpBB-Community
https://www.phpbb.de/community/
Code: Alles auswählen
$count_files[file] = 0;
Code: Alles auswählen
$count_files[file] = -1;
Code: Alles auswählen
$uploadsize = get_dir_size_upload("./files/");
$avatarsize = get_dir_size_avatar("./images/avatars/gallery/");
$count_files_upload = count_files_upload("./files/");
Code: Alles auswählen
$count_files_avatar = count_files_avatar("./images/avatars/gallery/");
Code: Alles auswählen
Warning: main(./includes/page_header.php): failed to open stream: No such file or directory in /home/ftp00072xvl/http/phpBB/index.php on line 265
Warning: main(): Failed opening './includes/page_header.php' for inclusion (include_path='.:/usr/local/lib/php:/usr/share/php') in /home/ftp00072xvl/http/phpBB/index.php on line 265
Template->make_filename(): Error - file ./templates/subSilver/index_body.tpl does not exist
Code: Alles auswählen
function count_files_upload($dir)
{
if(is_dir($dir))
{
$count_files_upload[file] = -1;
chdir($dir);
$handle = opendir(".");
while($file = readdir($handle))
{
if(is_dir($file) && $file != "." && $file != "..")
{
$count_files_upload[file] += $y[file];
}
if(is_file($file))
{
$count_files_upload[file]++;
}
}
if(stristr($dir,"../")) chdir($_SERVER["DOCUMENT_ROOT"].substr($_SERVER["PATH_INFO"],0,strrpos($_SERVER["PATH_INFO"],"/")));
elseif($dir != ".") chdir("../");
closedir($handle);
}
return $count_files_upload;
}
function count_files_avatar($dir)
{
if(is_dir($dir))
{
$count_files_avatar[file] = -1;
chdir($dir);
$handle = opendir(".");
while($file = readdir($handle))
{
if(is_dir($file) && $file != "." && $file != "..")
{
$count_files_avatar[file] += $y[file];
}
if(is_file($file))
{
$count_files_avatar[file]++;
}
}
if(stristr($dir,"../")) chdir($_SERVER["DOCUMENT_ROOT"].substr($_SERVER["PATH_INFO"],0,strrpos($_SERVER["PATH_INFO"],"/")));
elseif($dir != ".") chdir("../");
closedir($handle);
}
return $count_files_avatar;
}
Code: Alles auswählen
$uploadsize = get_dir_size_upload("./files/");
$avatarsize = get_dir_size_avatar("./images/avatars/gallery/");
$count_files_upload = count_files_upload("./files/");
$count_files_avatar = count_files_avatar("./images/avatars/gallery/");
Code: Alles auswählen
$count_files_upload = count_files_upload("/home/ftp00072xvl/http/phpBB/files/");
$count_files_avatar = count_files_avatar("/home/ftp00072xvl/http/phpBB/images/avatars/gallery/");