Free Software Server Environment : SmartyTemplates

HomePage :: Categories :: PageIndex :: RecentChanges
Search this site: FSSE.INFO is produced by "osde8info" :

Revision [768]

Most recent edit made 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
// 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 edited on 2008-10-08 21:11:50 by FsseInfo
http://www.smarty.net/quick_start.php

Smarty Templates


How to Install Smarty Securely

download smarty
untar/unzip smarty

put smarty library OUTSIDE docroot but in php include path
# mkdir /usr/share/php
# mv smarty/libs/ /usr/share/php/smarty


put smarty tempfiles OUTSIDE docroot
# cd /var/local
# mkdir smarty
# mkdir smarty/templates
# mkdir smarty/templates_c
# mkdir smarty/cache
# mkdir smarty/configs

# chown -R apache:apache smarty
%%


REFERRERS
FsseFrameworks
Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by WikkaWiki
Page was generated in 0.0811 seconds