Hi Everyone, Please be gentle, i'm just starting to walk down the php path :) I'm trying to get my head round php classes. I've created a very simple class to get the size of a file. I have created a function to get the file size which works fine. However if I want to to this a default action when I create the class I added the function to the constructor, but php moans that it can find the function. My guess is either my logic is wrong or some thing to do with scope? (code below) any advice is welcomed at this point, while I still have hair ;) [code] <?php class fileInf { var $file_name; var $size; function set_size() { filesize($this->file_name); } function get_size() { echo "File size is : " . $this->size; } function fileInf($filename) { $this->file_name=$filename; set_size(); } } $myfile = new fileInf("c:\pagefile.sys"); $myfile->get_size(); ?> [/code] thanks again. Keith