WeberDev.com PHP and MySQL Code

LOG IN
BEGINNER GUIDESPHP CLASSESCODE SEARCHARTICLES SEARCHPHP FORUMSPHP MANUALPHP FUNCTIONS LISTWEB SITE TEMPLATES
Start typing to search for PHP and MySQL Code Snippets and Articles Search
Submit a code Example / Snippet Join us on FaceBook
Submit a code Example / Snippet Submit Your Code
Poker Tournaments Poker Tournaments
Poker Guide for Developers Poker Guide for Developers
Search Engine Optimization Monitor SEO Monitor
Web Site UpTime Monitor UpTime Monitor
Your Personal Examples List My Favorite Examples
Your Personal Articles List My Favorite Articles
Edit Account Info Update Your Profile
PHP Code Search
Web Development Forums
Learn MySQL Playing Trivia
PHPBB2 Templates
Web Development Resources
Web Development Content
Internet Security Software
PHPClasses
PHP Editor
PHP Jobs
Vision.To Design
Ajax Tutorials
PHP Programming Help
PHP/MySQL Programming
Webmaster Resources
Webmaster Forum
XML meta language
website builder
פרייסז - הכח לקנות עובר לידיים שלך
Texas Holdem Poker Evangelists

Go Back Add a Comment Send this example to a friend Add this Article to your personal favoritest for easy future access to your favorite Code Examples and Articles. Submit a code example Print this code example.
BACK ADD A COMMENT SEND TO A FRIEND ADD TO MY FAVORITES ADD CODE EXAMPLES PRINT
Title : Kasskooye($path) tell you the complete size of a folder
Categories : PHP, Algorithms, Utilities, Filesystem Update Picture
Benedetto Patrice
Date : Feb 22nd 2001
Grade : 3 of 5 (graded 5 times)
Viewed : 5749
File : No file for this code example.
Images : No Images for this code example.
Search : More code by Benedetto Patrice
Action : Grade This Code Example
Tools : My Examples List

Submit your own code examples  Submit your own code examples 
 

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 ????



Quote For the Day
Categories : PHP, Utilities, Filesystem
Recursive function to move files on a filesystem. It can be minor changed in order to copy recursively.
Categories : PHP, Filesystem, Algorithms
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
Contents Page - a script to build contents pages.
Categories : Complete Programs, 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
GuestBook Light - a plug and play application for any website.
Categories : PHP, Complete Programs, Filesystem, Sessions
Directory TreeView - File Manager & Explorer - FTP - Utility - PHP/HTML -
Categories : PHP, Directories, FTP, Filesystem, HTML and PHP
Finds files on your site, uses UNIX find command.
Categories : Complete Programs, Filesystem, PHP
Upload function using PHP's FTP abilities.
Categories : PHP, Filesystem, FTP
Relative Path
Categories : PHP, Filesystem
A flat file counter
Categories : PHP, Cookies, Filesystem, Beginner Guides
basename -- Returns filename component of path
Categories : PHP, PHP Functions, Filesystem
Timer - a class that uses microtime() to provide easy calculation of elapsed times
Categories : Algorithms, PHP, PHP Classes
A recursive function to traverse a multi-dimensional array where the dimensions are not known
Categories : Arrays, PHP, Algorithms
Handle multiple file upload
Categories : Complete Programs, Filesystem, PHP, HTML and PHP