Mam taki problem:
Utworzyłem Katalogi:
Kernel
Templates
i w katalogu głównym jest plik index.php, który uruchamia klase z pliku Templates/template.php. Plik wywołuje funkcje load która ma zaincludować plik Templates/index.php i... błąd. Mam już tego dosyc, denerwuje mnie to. Poniżej błędy i zawartośc plików:
Błąd
Cytat
Warning: template::include(../Templates/Underground/index.php) [template.include]: failed to open stream: No such file or directory in /opt/lampp/htdocs/CMS/Kernel/template.php on line 8
Warning: template::include() [function.include]: Failed opening '../Templates/Underground/index.php' for inclusion (include_path='.:/opt/lampp/lib/php') in /opt/lampp/htdocs/CMS/Kernel/template.php on line 8
Warning: template::include() [function.include]: Failed opening '../Templates/Underground/index.php' for inclusion (include_path='.:/opt/lampp/lib/php') in /opt/lampp/htdocs/CMS/Kernel/template.php on line 8
Template.php
<?php /* CMSIK engine v 0.1 BETA -obsługa szablonów */ class template { function load($name) { include('../Templates/' . $name . '/index.php'); } } ?>
index.php
<?php include('Kernel/template.php'); $szablon = new template; $szablon->load('Underground'); ?>