MAm malutki problem z moim cms'em. Otórz na poczekanie zrobiłem prosty sustem newsów (oto on w skrócie):
lecz niewiem czemu niechce on wyświetlać mi wyników, a klasa do mysql'a działa poprawnie. W pliku index.php mam taki kod:
<?php class news { var $news_author, $news_date, $news_subject, $news_id, $news_text; function pokaz_one ($il_znakow = ''){ $sql = new db($MySQL_Host, $MySQL_User, $MySQL_Password, $MySQL_DataBase); $sql->query(\"SELECT * FROM\" . cms_news); $row = $sql->fetch_array(); $this->news_id = $row['news_id']; $this->news_author = $row['news_author']; $this->news_text = $row['news_text']; $this->news_date = $row['news_date']; $this->news_subject = $row['news_subject']; if ($il_znakow = '') { $this->news_text; } else { } } ?>
i własnie czemu nic w to miejsce niewkleja, templet działa bo inne info mi wyświetla. pomóżcie z góry tnx
<?php $news= new news; $news->pokaz_one(); $output = new output('templates/index.tpl'); 'stopka' => $stoper->koniec(), 'news_id' => $news->news_id, 'news_subject' => $news->news_subject, 'news_author' => $news->news_author, 'news_date' => $news->news_date, 'news_text' => $news->news_text); $output->save($output_values); ?>