function get_folder_size($path) { if (!file_exists($path)) { return 0; } if (is_file($path)) { return filesize($path); } $ret = 0; foreach (glob($path . "/*") as $fn) { $ret += gdFunctionsGDSR::get_folder_size($fn); } return $ret; }
?> </strong> </form> <?php _e("Total files cached", "gd-star-rating"); ?> : <strong><?php echo gdFunctionsGDSR::get_folder_files_count(substr(STARRATING_CACHE_PATH, 0, strlen(STARRATING_CACHE_PATH) - 1)); ?> files</strong> <br /> <?php _e("Total size of cached files", "gd-star-rating"); ?> : <strong><?php echo gdFunctionsGDSR::get_folder_size(substr(STARRATING_CACHE_PATH, 0, strlen(STARRATING_CACHE_PATH) - 1)); ?> bytes</strong> </td> </tr> <tr><th scope="row"><?php _e("Debug", "gd-star-rating"); ?> </th> <td> <form method="post"> <?php _e("Empty the debug file", "gd-star-rating"); ?> <strong>'<?php echo STARRATING_LOG_PATH;