Created
December 22, 2008 04:08
-
-
Save sotarok/38884 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
define ('SMARTY_DIR', '/path/to/smarty/'); // 設置したSmarty本体へのパスを設定します(絶対パス) | |
require_once 'Smarty/Smarty.class.php'; | |
$smarty = new Smarty(); | |
$smarty->template_dir = '/path/to/templates/'; // 設置したtemplates への絶対パス | |
$smarty->compile_dir = '/path/to/templates_c/'; // 設置したtemplates_cへの絶対パス | |
$smarty->display('index.tpl'); // こうすることで、templatesディレクトリにある index.tpl を読み込み、出力する |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment