header("Content-Type: $this->filetype");
should be
header("Content-Type: " . $this->filetype);

jalil wrote:Note: If you just want to get the contents of a file into a string, use file_get_contents() as it has much better performance than the code above.