![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Postów: 0 Pomógł: Dołączył: -- Ostrzeżenie: (0%) ![]() ![]() |
mam taka klase (nie jest moja)
[php:1:c6d1ae1424]<? <?php class Template { var $unparsed = array(0 => ''); var $parsed = ''; var $blocks = array('default' => ''); function template($plik) { $this -> unparsed = @file('tpl/'.$plik.'.tpl'); } function parse() { $this -> parsed = ''; $cnt = count($this -> unparsed); for($i = 0; $i <= $cnt; $i++) { $tekst = $this -> unparsed[$i]; $found = array(); if(preg_match_all("#{(.+?)}#is", $tekst, $found)) { foreach($found[1] as $block) { $block_names[] = '{'.$block.'}'; $block_values[] = &$this -> blocks[$block]; } $tekst = str_replace($block_names, $block_values, $tekst); } $this -> parsed .= $tekst; } } } ?> [/php:1:c6d1ae1424] i jak chce ja dolaczyc zeby potem uzyc to wywala mi taki blad Cytat Fatal error: Cannot redeclare class template in C:wwwtemplate_class.php on line 2
o co chodzi ![]() |
|
|
![]() ![]() |
![]() |
Aktualny czas: 21.08.2025 - 14:22 |