index.php
Code:
<?php
ob_start();
include ("config.php");
$a = new Template();
$file = $_GET["file"];
$a->assign('file', $file);
$a->display('index.html');
ob_end_flush();
?>
<?php
ob_start();
include ("config.php");
$a = new Template();
$file = $_GET["file"];
$a->assign('file', $file);
$a->display('index.html');
ob_end_flush();
?>
home.php
Code:
<?php
class content extends template{
function content(){
$this->title = "title sajta";
$this->desc = "Opis stranice";
$this->keywords= "ovdje idu kljucne, rijeci, bla bla, nemam pojma, svasta nesto ide ovdje";
$this->assign('title', $this->title);
$this->assign('desc', $this->desc);
$this->assign('keywords', $this->keywords);
$this->display('nest.html');
}
}
$c = new content;
?>
<?php
class content extends template{
function content(){
$this->title = "title sajta";
$this->desc = "Opis stranice";
$this->keywords= "ovdje idu kljucne, rijeci, bla bla, nemam pojma, svasta nesto ide ovdje";
$this->assign('title', $this->title);
$this->assign('desc', $this->desc);
$this->assign('keywords', $this->keywords);
$this->display('nest.html');
}
}
$c = new content;
?>
i sad kad upisem u nest.html {$title} on ispise, ali kako bih da upisem u index.html a da on ispise onaj sto je u ?file=nesto.php , home.php itd. Ovisno koji je file otvoren...
??
Edit:DakiPro: Koristi [ code ] tagove!
[Ovu poruku je menjao dakipro dana 19.10.2008. u 12:53 GMT+1]