Introduction Smarty Template

xiaoxiao2021-03-06  62

Introduction Smarty Template

Author: Unknown Updated: Legume Source: ddvip.net Update Time: 2004.08.21 Contributor mail: tg * ddvip.com following description is based on version 2.5, I do not know there is no BUG, ​​OS is win2000, php should after 4.1 can. The brothers used it several times when they were developed, and they did not have too deep research. Introduced, they can find it on the manual. If there is any error, it is inevitable that the smarty template is said to be recommended by php.net, which is said to be strong, It is said that the speed is not slow, it is said to be more and more > official website smarty.php.net has a forum, there are downloads There is a manual.</p>
<p>There is everything you want, cut into the topic: (-) Install: There are three lower levels after downloading: Template file directory is <libs> There are four class files under it. First introduce the most important: smarty. Class.php It should be the core class of the entire Smarty template. It is also deal with it when applying it. It is established in your application directory: / app_1 / smarty / libs / app_1 / smarty / templates_c / app_1 / smarty / Templates / App_1 / Smarty / Configs <libs> Corresponding to the Libs directory under the compressed package, install the class file <templates> storage template file required, the program file is placed here <Configs> Store the mode properties file, after detail Say <templates_c> Store to store the bundled template file or above the file name is SMARTY default file name, the user can specify a different file name, such as : guest_template_dir, admin_template_dir et al. If not specified, the above file name (2) use: Design Template: 1 Template Variable: {$ Variable Name}, {$ Color}, {$ TYPE} Test_color.tpl {$ name} Test_url.tpl display (template file name); $ smarty-> assign (' color ',' red '); $ smarty-> assign (' name ',' Hello World '); // Display Template // Output: <


New Post(0)