real-simple-template-parser
Gesponsorde koppelingen
PHP script bestanden
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?
# NRSTP - Nille's Real Simple Template Parser
# Copyright 2006 @ Nille
# [email protected]
error_reporting(0);
class parser {
var $versie = "1.0";
var $templatecontent;
var $templatefile;
function parser($file) {
$this->templatefile = $file;
$this->templatecontent = file_get_contents($this->templatefile)or die("Fout: \"$this->templatefile\" kon niet geopend worden!");
}
function assign($block, $content) {
$block = '[' . $block . ']';
$this->templatecontent = str_replace($block, $content, $this->templatecontent);
}
function output() {
echo $this->templatecontent;
}
}
?>
# NRSTP - Nille's Real Simple Template Parser
# Copyright 2006 @ Nille
# [email protected]
error_reporting(0);
class parser {
var $versie = "1.0";
var $templatecontent;
var $templatefile;
function parser($file) {
$this->templatefile = $file;
$this->templatecontent = file_get_contents($this->templatefile)or die("Fout: \"$this->templatefile\" kon niet geopend worden!");
}
function assign($block, $content) {
$block = '[' . $block . ']';
$this->templatecontent = str_replace($block, $content, $this->templatecontent);
}
function output() {
echo $this->templatecontent;
}
}
?>