実用環境
テンプレートや設定ファイルをドキュメントルートの外に配置することで、Webブラウザからこれらのファイルが見えなくなります。
方法は、Smartyクラスのプロパティ$template_dir, $compile_dir, $config_dir, $cache_dirに場所を設定します。
また、この設定はSmartyを使用する各アプリケーションごとに区別して設定する事が推奨されています。

下記の場所に配置することにします。
─┬─htdocs/ ─┬─index.html
└─SampleApp/ ───index.php
└─Smarty/ ─── SampleApp/─┬─ templates/──index.tpl
├─templates_c/
├─configs/
└─cache/
これで安全に、Smartyを利用できるようになります。

Smartyが動作するか確認プログラムを修正します(下記を入力したファイルindex.phpを作成)。
<?php
require_once('Smarty.class.php');

// create object
$smarty = new Smarty;

// smarty config(template cache ...)
$smarty->template_dir= '../../Smarty/SampleApp/templates/';
$smarty->compile_dir = '../../Smarty/SampleApp/templates_c/';
$smarty->config_dir = '../../Smarty/SampleApp/configs/';
// $smarty->cache_dir= '../../Smarty/SampleApp/cache/';

// assign some content.
$smarty->assign('name', 'sagasaga');
$smarty->assign('path', ini_get('include_path'));

// display it
$smarty->display('index.tpl');
?>
ブラウザで、http://localhost/SampleApp/index.phpへアクセスして正常に表示されるのを確認します。

実際のアプリケーションでは、さらにフォルダ分けをおこなうのが普通です。
Smarty/─── SampleApp/─┬─ templates/─┬─ applicationAA/ aa.tpl
├─applicationBB/ bb.tpl
├─applicationCC/ cc.tpl
└─.....
├─templates_c/
├─configs/
└─cache/