class DB { var $dblink=null; var $dbresult; var $postdir; /** * Constructor - establishes DB connection */ function DB() { $this->postdir=$_SERVER['DOCUMENT_ROOT'].'/../posts/'; if (!is_writable($this->postdir)) die("{$this->postdir} needs to be a writable dir to use file storage engine"); }