<?php $zapytanie = 'SELECT * FROM `forum_fora` '; include ('dane.inc'); } } { 'TYTUL' => $wiersze['ftytul'], 'PODTYTUL' => $wiersze["fpodtytul"]); } $tpl = new Chameleon; $tpl -> load('forum.tpl'); $tpl -> setVar('FORUM',$dforum); $tpl -> display(); ?>
zrobiłęm potem tak
<?php $tpl = new Chameleon; $tpl -> load('header.tpl'); $tpl -> setVar('TYTUL', 'FORUM'); $tpl -> display(); $buffer = $tpl -> parse(); $zapytanie = 'SELECT * FROM `forum_fora` '; $wynik = pobierz($zapytanie); // !!!!!!!!chodzi o to { 'TYTUL' => $wiersze['ftytul'], 'PODTYTUL' => $wiersze["fpodtytul"]); } $tpl = new Chameleon; $tpl -> load('forum.tpl'); $tpl -> setVar('FORUM',$dforum); $tpl -> display(); // a to jest ta funkcja function pobierz($co) { include ('dane.inc'); } } if ($wynik !== TRUE) } return $zwroc; } ?>
a błąd jest taki:
Kod
Fatal error: Call to undefined function pobierz() in C:\Program Files\WebServ\httpd-users\forum\test.php on line 15
Zaczęło działać ale jak przekopiuję treść funkcji do tego samego pliku.
Ale normalnie ona znajduje się w funkcje.php
zrobiłem tak:
<?php include ('funkcje.php'); ?>
i tak jakby nie dodawało
próbowałem require() i require_once() ale efekt taki sam
