WeberDev.com PHP and MySQL Code

LOG IN
BEGINNER GUIDES  |  PHP CLASSES  |  CODE SEARCH  |  ARTICLES SEARCH  |  PHP FORUMS  |  PHP MANUAL  |  PHP FUNCTIONS LIST  |  WEB SITE TEMPLATES
Start typing to search for PHP and MySQL Code Snippets and Articles Search
Submit a code Example / Snippet Submit Your Code
Search Engine Optimization Monitor SEO Monitor
Web Site UpTime Monitor UpTime Monitor
WeberDev's Monthly code contest PHP Code Contest
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 Index
Web Development Resources
Web Development Content
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
Mobile Dev World

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 : 4881
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 
 

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
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
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
Recursive function to move files on a filesystem. It can be minor changed in order to copy recursively.
Categories : PHP, Filesystem, Algorithms
Contents Page - a script to build contents pages.
Categories : Complete Programs, PHP, Utilities, Filesystem
Variable serialization and unserialization. Loading and saving variable structures to and from file.
Categories : Arrays, Filesystem, Variables, Strings, PHP
Latitude-Longitude to Miles
Categories : PHP, Utilities, Math.
An efficient iterative and buffered text file reader
Categories : PHP, Classes and Objects, Filesystem, PHP Classes, Log Files
filesystem Show Files Script
Categories : PHP, Filesystem, Java Script
The Porter Word Stemming Algorithm in PHP Reduces words to their base stem for search engines and indexing
Categories : Algorithms, PHP, Strings
Mail-lib provides a simple interface to the sendmail program. Note: you must actually have sendmail on your machine (sorry windows NT users).
Categories : Algorithms, Email, PHP
Convert a File database into MySQL
Categories : PHP, Filesystem, Databases, MySQL, Beginner Guides
A recursive function to traverse a multi-dimensional array where the dimensions are not known
Categories : Arrays, PHP, Algorithms
Download manager - A PHP script for adding a download page to any site.It also enables you track the no. of downloads.
Categories : PHP, Content Management, Filesystem, Databases, MySQL
Remote File Size
Categories : PHP, Filesystem, HTTP, Sockets