Changeset 7631 for trunk/src/inc/FileHandler.class.php
- Timestamp:
- Mar 30, 2010, 8:51:44 PM (15 years ago)
- Location:
- trunk/src/inc
- Files:
-
- 1 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/inc/FileHandler.class.php
r7622 r7631 14 14 * Function: Handling with a node file 15 15 */ 16 public function __construct( string$filename) {16 public function __construct($filename) { 17 17 try { 18 $this->file = fopen($filename); 18 $handle = fopen($filename, 'r'); 19 $this->file = ''; 20 while (!feof($handle)) { 21 $this->file .= fread($handle, 8192); 22 } 23 fclose($handle); 19 24 } catch (Exception $err) { 20 25 // TODO: Better error description 21 26 trigger_error(); 22 27 } 28 } 23 29 24 // TODO: Needs to do something 30 public function getFile() { 31 return $this->file; 25 32 } 26 33 }
Note:
See TracChangeset
for help on using the changeset viewer.