Редакция 371 | Редакция 373 | К новейшей редакции | Весь файл | Учитывать пробелы | Содержимое файла | Авторство | Последнее изменение | Открыть журнал | RSS
Редакция 371 | Редакция 372 | ||
---|---|---|---|
Строка 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 | $fh = fopen($this->path.$name, "r"); |
29 | $content = fread($fh, filesize($this->path.$name)); |
29 | $content = fread($fh, filesize($this->path.$name)); |
30 | fclose($fh); |
30 | fclose($fh); |
31 | foreach ($attrs as $attr) { |
31 | foreach ($attrs as $attr) { |
32 | $content = str_replace("{".$attr."}", $this->__get($attr), $content); |
32 | $content = str_replace("{".$attr."}", $this->__get($attr), $content); |
33 | }
|
33 | }
|