Welcome Guest, Not a member yet? Register   Sign In
Passing additional variable from library to view ->Listfiles
#1

[eluser]BobbyB[/eluser]
Hi,
I am trying to pass a variable (directory size) from the Listfiles library that can be found in the wiki to my view.
Code:
...
foreach($this->filetype as $type){
                                if($type == $fileinfo['extension']){
                                    $t['file']= $this->dir . "/" . $file;
                                    list($f,$e) = explode('.', $file);
                                    $t['title']= str_replace('_',' ',ucfirst($f));

                            $t['size'] = round(filesize($this->dir . "/" . $file)/1048576,2);
                            $directorysize += $t['size'];    

                                    array_push($this->files,$t);
                                }
                            }
                        }
                    }
                }
                closedir($handle);
                return($this->files);...

How can I pass the $directorysize(or any) variable to my controller and finally to my view?
Thanks in advance.

Cheers




Theme © iAndrew 2016 - Forum software by © MyBB