public function FrxFile::contents in Forena Reports 7.3
Same name and namespace in other branches
- 7.4 FrxFile.inc \FrxFile::contents()
 
Return the contents of a file located in the report directory
Parameters
$filename filename and extension for report file.:
File
- ./
FrxFile.inc, line 55  - FrxFile.inc File toolbox for manipulating files contained tn the report directory.
 
Class
- FrxFile
 - @file FrxFile.inc File toolbox for manipulating files contained tn the report directory.
 
Code
public function contents($filename) {
  if ($this
    ->exists($filename)) {
    return file_get_contents($this
      ->path($filename));
  }
  else {
    return '';
  }
}