Od jakiegoś czasu pracuje nad swoim własnym CMSem.
Plik core/objects/template.class.php
http://wklej.org/id/119515/
Plik index.php
<?php require('core/config.php'); ?>
Plik core/config.php
<?php // klasa konfiguracyjna class Config { // database configuration const DBHost = 'xxx'; const DBUser = 'xxx'; const DBPassword = 'xxx'; const DBName = 'xxx'; const DBCharset = 'xxx'; // database tables const DownloadTable = 'xxx'; const NewsTable = 'xxx'; // file paths const MainPath = 'xxx'; const ObjectsPath = 'core/objects/'; const SQLLogsPath = 'logs/sql'; const InternalLogsPath = 'logs/internal'; // site configuration const Template = '1'; const Keywords = 'costam niewaznego'; const Description = 'costam niewaznego'; const Copyright = 'costam niewaznego'; const Charset = 'UTF-8'; } // koniec klasy // potrzebne pliki require(''.Config::ObjectsPath.'db.class.php'); require(''.Config::ObjectsPath.'news.class.php'); require(''.Config::ObjectsPath.'download.class.php'); require(''.Config::ObjectsPath.'log.class.php'); require(''.Config::ObjectsPath.'template.class.php'); // inicjowanie klas $db = new DB; ?>
Problem polega na tym, że jak np. dodam do jakiegokolwiek z plików (right_menu.php, left_menu.php czy index_page.php) kod PHP - na stronie nie jest on wyświetlany. Jak zmodyfikować moją klasę, aby móc również wyświetlać kod PHP, a nie tylko statyczny HTML?