• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Extreamly new here! PHP coding newbie

I have to write a code that reads the local machines hard disk, and then later on change it to read a network machines memory. This is what I came up with ( its almost like a flowchart), I can figure out the coding later but for now I just need a basic flowchart to give me directions... C&C is what im here for. please.

$handle = opendir('a main directory like C:');

While( read next ITEM in directory - possibaly (false !== ($file = readdir($handle))){
$harddisk_size = 0;
if ( ITEM != a folder){
Do while ( $filename = read next file in folder !== NULL){
$file_size = filesize(Directory . filename);
$total_size = $size + $total_size;
echo $total_size.
if(ITEM == a folder){
$handle = opendir('that folder'); and reapeted at top....
While( read next ITEM in directory - possibaly (false !== ($file = readdir($handle))){
if ( ITEM != a folder){
Do while ( $filename = read next file in folder !== NULL){
$file_size = filesize(Directory . filename);
$total_size = $size + $total_size;
echo $total_size.

just thought of it what if i have many subfolders.....




 
Back
Top