Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class GuestBook {
- public $text;
- protected $reviews = [];
- public function __construct ($file) {
- $file = fopen ( $file, 'r' );
- while ( !feof($file) ) {
- $line = fgets($file, 1024);
- this->reviews[ ] = $line;
- }
- }
- public function getData() {
- $b = file ( __DIR__ . /guestbook.txt);
- return $b;
- }
- public function append($text) {
- $c = fopen ( __DIR__ . /guestbook.txt, 'a');
- fwrite ( $c, $this->text );
- fclose ( $c );
- }
- public function save() {
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement