|
|
|
function kasskooye($d ="." )
{
// © kasskooye and zoyhum
$h= @opendir($d); if($h==0)return 0;
while ($f=readdir($h)){
$sf+=filesize($nd=$d."/".$f);
if($f!="."&&$f!= ".." &&is_dir($nd)){$sf+=kasskooye ($nd);}}
closedir($h);
return $sf ;
}
examples of uses
echo kasskooye( $path ) ;
echo kasskooye( "." ) ;
echo kasskooye( "images/" ) ;
same as echo kasskooye( "images" ) ;
or echo kasskooye( "images/" ) ;
or echo kasskooye( "/images/" ) ;
( do not ask for anything else don't change anything , it works )
// right ????
|
|
| Recursive function to move files on a filesystem. It can be minor changed in order to copy recursively.
Categories : PHP, Filesystem, Algorithms | | | Quote For the Day Categories : PHP, Utilities, Filesystem | | | These 2 functions write and read the contents of a specially designated multi-dimensional array to and from a text file. Categories : Algorithms, PHP, Filesystem | | | Contents Page - a script to build contents pages. Categories : Complete Programs, PHP, Utilities, Filesystem | | | grab directory listings into an array the example prints out each
subdirectory in the main dir - further work is to be performed on this one Categories : Filesystem, PHP, Directories, Search, Utilities | | | file class , uploade file , download file already uploaded on another website Categories : PHP, PHP Classes, Filesystem, Web Services | | | Latitude-Longitude to Miles Categories : PHP, Utilities, Math. | | | Dollar Serial Number Validator Categories : PHP, Security, Algorithms | | | Introduction to Language Files Categories : PHP, Filesystem, Beginner Guides | | | A flat file counter Categories : PHP, Cookies, Filesystem, Beginner Guides | | | Show Source with Line Numbers Categories : PHP, Regexps, Filesystem | | | Check parameters validity. Paranoia was designed to check the validity of the parameters that a php page will receive after a form submission. It can be used to check the variables sent by POST or GET Categories : Algorithms, HTML and PHP, PHP, Variables | | | A very simple way to build and do a hierarchical html categories browser without javascript , just using html php and mySql
Categories : HTML and PHP, Databases, Algorithms, PHP, MySQL | | | Simple way to replace a variable value in a .conf (.ini) file using a
webbrowser - the first stage of a complete universal configuration editor Categories : PHP, Regexps, Code Editors, Filesystem | | | Display list of files within current and subdirectories (recursively) showing
each file as an anchored link and each directory as a category header. Categories : Filesystem, Directories, Arrays, PHP | |
|
|
|