Header

123N2



$filename) { printf( '
%s%s
', urlencode( $filename), $filename, human_filesize( filesize( $dir . '/' . $filename ) , 1 ) ); } ?>





$v) { if ($v != "." && $v != "..") { echo $v . ' | ' . date('F d Y H:i:s', @filectime($dirpath . $v))."\n"; } } } } print_r(filedate('linuxtheme/linuxtheme1/'), $return = null); ?>

>>>>>>>>>>>>>>>>>>>>>>>>>>>> TRANSLATION <<<<<<<<<<<<<<<<<<<<<<<<<<<< file_list("/home"); //return list of files (no directories) file_list("/home", ".jpg"); //return only .jpg file list \********************************************************************/ //(note: one slash (/) below and you enable all your test functions, guess where ;-)) /********************************************************************\ // TEST FUNCTIONS... IF THESE WORK, THIS FUNCTION WORKS ON THIS PLATFORM */ echo "
File List:
"; $n = file_list(getcwd()); if($n) foreach($n as $f) echo "$f
" ; //current files echo "
Files with extension .php:
"; $n = file_list(getcwd(),".php"); if($n) foreach($n as $f) echo "$f
"; //files with .php extensions echo "
Directories:
"; $d = dir_list(getcwd()); if($d) foreach($d as $f) echo "$f
"; //directories /********************************************************************/ /************\ RUNTIME NOTES: file_list($arg1); // php issues a warning that there is no second parameter, but we know that, izz ok \************/ /*******************************\ TESTED AND WORKING ON 2009.04.30: OS: Linux 2.6.9-78.0.17.ELsmp APACHE: 2.2.9 PHP: 5.2.5 \*******************************/ ?>
1024){ $filesize = ($filesize/1024); if($filesize > 1024){ $filesize = ($filesize/1024); if($filesize > 1024) { $filesize = ($filesize/1024); $filesize = round($filesize, 1); return $filesize." ГБ"; } else { $filesize = round($filesize, 1); return $filesize." MБ"; } } else { $filesize = round($filesize, 1); return $filesize." Кб"; } } else { $filesize = round($filesize, 1); return $filesize." байт"; } } /* usage 1 */ $file = ('price.csv') ; $size = get_filesize ($file); echo "Размер файла $file : ".$size.""; /* usage 2 */ $dir = 'linuxtheme/'; $files = array_diff( scandir( $dir), array('..', '.')); foreach($files AS $i => $filename) { printf( '
%s%s
', urlencode( $filename), $filename, get_filesize ( $dir . '/' . $filename ) ); } ?>