thank you for the reply.
what i do in this case. I dont want my user to edit anything in the class file.
they can only chage $them, $path variable.
let say i have a file mainfile.php like this
<?php
include("template.php");
$theme="default";
$path="somelocation";
class Template extends Mytemplate {
function Template(){
$this->template_dir = "$path/template/$theme/templates/";
$this->compile_dir = "$path/template/$theme/templates_c/";
}
}
And every pags i say
<?Php
require_once("mainfile.php");
$tpl= new template();
// and rest of the code goes here
?>
I dont want to pass $theme and $path in the constructor every time i create an object. Because I will have to say
require_once("mainfile.php");
global $theme,$path;
$tpl = new Template($theme,$path);