Revision [768]

Last edited on 2008-10-08 22:01:30 by FsseInfo
Additions:
===Smarty Sample App===
http://www.smarty.net/sampleapp/sampleapp_p1.php


Revision [767]

Edited on 2008-10-08 21:59:17 by FsseInfo
Additions:
http://www.smarty.net/manual/en/language.function.php.php


Revision [766]

Edited on 2008-10-08 21:35:58 by FsseInfo
Additions:
===Create PHP Smarty test file===
$ cd webroot (ie /var/www/)
$ vi smarty.php
$ vi smarty.tpl
Hello {$name}!
Deletions:
vi /var/www/smarty.php
// put full path to Smarty.class.php
vi /var/local/smarty/templates/smarty.tpl
Hello, {$name}!


Revision [765]

Edited on 2008-10-08 21:30:45 by FsseInfo
Additions:
$smarty->template_dir = dirname(__FILE__) ;
Deletions:
$smarty->template_dir = '/var/local/smarty/templates';


Revision [764]

Edited on 2008-10-08 21:21:49 by FsseInfo
Additions:
vi /var/www/smarty.php
%%(php)
<?php
// put full path to Smarty.class.php
require 'smarty/Smarty.class.php';
$smarty = new Smarty();
$smarty->template_dir = '/var/local/smarty/templates';
$smarty->compile_dir = '/var/local/smarty/templates_c';
$smarty->cache_dir = '/var/local/smarty/cache';
$smarty->config_dir = '/var/local/smarty/configs';
$smarty->assign('name', 'GNU LINUX');
$smarty->display('smarty.tpl');
?>
vi /var/local/smarty/templates/smarty.tpl
%%(smarty)
<html>
<head>
<title>Smarty</title>
</head>
<body>
Hello, {$name}!
</body>
</html>


Revision [763]

Edited on 2008-10-08 21:12:13 by FsseInfo

No Differences

Revision [762]

The oldest known version of this page was created on 2008-10-08 21:11:50 by FsseInfo
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki