ホームページ >バックエンド開発 >PHPチュートリアル >兄さん、私のスマート設定はどうですか?

兄さん、私のスマート設定はどうですか?

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBオリジナル
2016-06-13 13:43:51950ブラウズ

私の Smarty 設定の何が問題なのでしょうか?
ディレクトリ構造は次のとおりです:smarty_pro1
---libs
---config
---templates (ここに配置します、index.tpl)
-- -templates_c
---cache
Index.php

index.php の内容は
define('SMARTY_PATH','. ./smarty_pro1/ ');
include_once(SMARTY_PATH.'libs/Smarty.class.php');

$smarty=new Smarty();

$smarty-> template_dir= SMARTY_PATH.'templates/';
$smarty->compile_dir= SMARTY_PATH.'templates_c/';
$smarty->config_dir= SMARTY_PATH.'configs/';
$smarty-> ;cache_dir= SMARTY_PATH .'cache/';

$smarty->left_delimiter='{';
$smarty->right_delimiter='}';
$smarty->assign ('title' ,'テストしてみます');
$smarty->assign('content','content');
$smarty->display('index.tpl');


?>

index.tpl コンテンツは





{ $title }
声明:
この記事の内容はネチズンが自主的に寄稿したものであり、著作権は原著者に帰属します。このサイトは、それに相当する法的責任を負いません。盗作または侵害の疑いのあるコンテンツを見つけた場合は、admin@php.cn までご連絡ください。