i have built my simple template for php site. the problem is that i don knw the nice way to include my css and javascript files .
here is my index.php file
<?php
include'core/template.php';
$temp=new Template();
$settings=array("title","page_title","welcome_word");
$values=array("RIS - Home","Results Information System","Welcome to result
Information system");
$temp->header($settings,$values);
$temp->footer();
?>
here is my template.php file
<?php
class Template {
public function header($setting,$values){
$file=file_get_contents("http://localhost/RIS/src/header.php");
$count=0;
foreach ($setting as $setting) {
$file=str_replace('{'.$setting.'}',$values[$count],$file);
$count++;
}
echo $file;
}
public function footer(){
$file=file_get_contents("http://localhost/RIS/src/footer.php");
echo $file;
}
}
?>
here is my header.php file
<!DOCTYPE html>
<html>
<head>
<title>{title}</title>
</head>
<body>
<header>
<h1>{page_title}</h1>
{welcome_word}
</header>
My contents goes here...
here is my footer.php file
<footer>
Copyright © RIS 2013.
</footer>
</body>
</html>
i have my css files and js files are in assets folder so how do i include them in my template?