public function FrxFile::contents in Forena Reports 7.4
Same name and namespace in other branches
- 7.3 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 302 - 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) {
$path = $this
->path($filename);
if (file_exists($path)) {
return file_get_contents($path);
}
else {
return '';
}
}