Редакция 370 | Редакция 372 | К новейшей редакции | Весь файл | Учитывать пробелы | Содержимое файла | Авторство | Последнее изменение | Открыть журнал | RSS
Редакция 370 | Редакция 371 | ||
---|---|---|---|
Строка 23... | Строка 23... | ||
23 | public function __construct($folder) { |
23 | public function __construct($folder) { |
24 | $this->path = $folder; |
24 | $this->path = $folder; |
25 | }
|
25 | }
|
26 | 26 | ||
27 | public function display($name, $attrs = null) { |
27 | public function display($name, $attrs = null) { |
- | 28 | $fh = fopen($this->path.$name, "r+"); |
|
28 | $content = implode('',$this->path.$name); |
29 | $content = fread($fh, filesize($this->path.$name)); |
- | 30 | fclose($fh); |
|
29 | foreach ($attrs as $attr) { |
31 | foreach ($attrs as $attr) { |
30 | $content = str_replace("{".$attr."}", $this->__get($attr), $content); |
32 | $content = str_replace("{".$attr."}", $this->__get($attr), $content); |
31 | }
|
33 | }
|
32 | 34 | ||
33 | return $content; |
35 | return $content; |