Saturday, August 30, 2008

PHP with smarty template engine installation

PHP with smarty installation is so easy....

just download the stable version of smarty package and unzip the folder and rename folder name "smarty"

and now you create four directory in your application folder

1) config
2) templates_c
3) templates
4) cache

and just create one php file and here just specify the pathe of smaty.connect.php file and all four directory path

like the pls see example below

// put full path to Smarty.class.php
$smarty = new Smarty();

$smarty->template_dir = '/web/';
$smarty->compile_dir = '/web/';
$smarty->cache_dir = '/web/';
$smarty->config_dir = '/web/';

$smarty->assign('name', 'MANISH');

now include above php file anywhere and use the smartyy template magic.

any question then pls cooment here....i will give u the answer...thanks


Narendra said...

its very nice.......

Reynold Hugh said...

Great Job!
PHP Nuke Templates

araon said...

Great job! web application

amhash said...

Awesome information. I am really surprised with this topic. Keep up the good work and post more here to read. Custom Logo Design