翻訳と辞書
Words near each other
・ SMAUG
・ Smaug
・ Smaug (genus)
・ SMAW
・ SMAWK algorithm
・ Smax
・ Smaïl Diss
・ Smaïl Khaled
・ Smaïn
・ Smażyno
・ Smažený sýr
・ Smaїl Chergui
・ SMB
・ SMB Adventure
・ Smartwrap
Smarty
・ Smarty (film)
・ Smarty Cat
・ Smarty Jones
・ Smarty Jones Stakes
・ Smarty Pants
・ Smartzee
・ Smarves
・ Smarzewo
・ Smarzykowo
・ Smarżowa
・ SMAS
・ Smash
・ Smash & Grab
・ Smash (British band)


Dictionary Lists
翻訳と辞書 辞書検索 [ 開発暫定版 ]
スポンサード リンク

Smarty : ウィキペディア英語版
Smarty

Smarty is a web template system written in PHP. Smarty is primarily promoted as a tool for separation of concerns.
Smarty is intended to simplify compartmentalization, allowing the front-end of a web page to change separately from its back-end. Ideally, this lowers costs and minimizes the efforts associated with software maintenance.
Smarty generates web content through the placement of special ''Smarty tags'' within a document. These tags are processed and substituted with other code. Tags are directives for Smarty that are enclosed by template delimiters. These directives can be variables, denoted by a dollar sign ($), functions, logical or loop statements. Smarty allows PHP programmers to define custom functions that can be accessed using Smarty tags.
== Smarty example ==
Since Smarty separates PHP from HTML, there are two files — one contains the presentation code: an HTML template, including Smarty variables and tags - - which might look like this:











The business logic to use the Smarty template above could be as follows:

define('SMARTY_DIR', 'smarty-2.6.22/' );
require_once(SMARTY_DIR . 'Smarty.class.php');
$smarty = new Smarty();
$smarty->template_dir = './templates/';
$smarty->compile_dir = './templates/compile/';
$smarty->assign('title_text', 'TITLE: This is the Smarty basic example ...');
$smarty->assign('body_html', '

BODY: This is the message set using assign()

');
$smarty->display('index.tpl');


抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)
ウィキペディアで「Smarty」の詳細全文を読む



スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース

Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.