Public Member Functions | |
dump () | |
Dump the contents of the file using fpassthru(). |
Definition at line 31 of file Blob.php.
Blob::dump | ( | ) |
Dump the contents of the file using fpassthru().
Exception | if no file or contents. |
Reimplemented from Lob.
Definition at line 39 of file Blob.php.
00040 { 00041 if (!$this->data) { 00042 // hmmm .. must be a file that needs to read in 00043 if ($this->inFile) { 00044 $fp = @fopen($this->inFile, "rb"); 00045 if (!$fp) { 00046 throw new Exception('Unable to open file: '.$this->inFile); 00047 } 00048 fpassthru($fp); 00049 @fclose($fp); 00050 } else { 00051 throw new Exception('No data to dump'); 00052 } 00053 00054 } else { 00055 echo $this->data; 00056 } 00057 00058 }