Added smarty support
This commit is contained in:
parent
1e1901dda4
commit
dc0453b60a
2 changed files with 24 additions and 0 deletions
15
html/test_smarty.php
Executable file
15
html/test_smarty.php
Executable file
|
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
|
||||
require('Smarty.class.php');
|
||||
$smarty = new Smarty();
|
||||
|
||||
$smarty->template_dir = '../templates';
|
||||
$smarty->compile_dir = '../compile';
|
||||
$smarty->cache_dir = '../cache';
|
||||
$smarty->config_dir = '../configs';
|
||||
|
||||
$smarty->assign('name', 'Stan');
|
||||
$smarty->display('index.tpl');
|
||||
|
||||
?>
|
||||
|
||||
9
templates/index.tpl
Executable file
9
templates/index.tpl
Executable file
|
|
@ -0,0 +1,9 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>Smarty</title>
|
||||
</head>
|
||||
<body>
|
||||
Hello, {$name}!
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue