Smarty's program design section: in the template design section of smarty, I briefly introduced some common settings of smarty in the template, this section describes how to start program design in smarty. PHP code :----------------------------------
Phpsmarty cache use 1. use cache? To enable the smarty cache, set caching to true and specify cache_dir. cache_lefetime is used to specify the cache survival time. multiple different caches must be generated for the same page in seconds. it is used
The Yii Framework allows developers to use their preferred template syntax (such as Prado and Smarty) to write controllers or pendant views. this can be achieved by writing and installing a viewRenderer application component. this view renderer
This article describes how to call FCKeditor in Smarty. Compared with common error methods, it describes how to call FCKeditor in Smarty. it is a very practical technique, for more information about how to call FCKeditor in Smarty, see the following
Smarty cleverly handles the content page code in iframe. I don't need to talk about it. I should know that iframe is often used to process navigation when I go into the background. if I do this function based on the general idea, it's quite simple,
This article mainly introduces the simple usage of the PHPSmarty template, and analyzes the configuration, variable setting, and usage of PHP's Smarty template call in the form of an instance, for more information about how to use the PHP Smarty
From: http://www.smarty.net/quick_start.php => http://news.php.net/php.smarty.dev/2703
This document assumes that your webserver and PhP5 is running.
Download smarty-http://smarty.php.net
Installation-Windows, IIS/Apache, PhP5Extract files,
Scattered my little station oh haha little station has been doing well for a long time has been improving www.wanleduo.com Shanghai play a good place php + smarty development, sf slowly enjoy, now go and have a look ~~, Good ., Pretty good & nbsp;,
Smarty is a very popular template in php development. In the past, I published an article on the development example of php smarty Chinese intercept plug-in to show you how to develop the smarty plug-in, this article will share with you how to
The data table structure of level Two classification is as follows:
Copy Code code as follows:
The PHP code is as follows
/**
@ article classification with two-level classification
@ param int $rootnum--Number of first class
1,smarty Cache Configuration:
$smarty->cache-dir= "directory name"; Create cache directory Name
$smarty->caching=true; Turn on cache, invalid cache for false
$smarty->cache_lifetime=60; Cache time, Unit is seconds
Use and purge of 2,smarty
This article has analyzed the Smarty template's usage method in detail, has certain reference value for the study smarty friend. Details are as follows:
comments in the template
Each smarty template file is developed by combining the syntax of the
The so-called compilation is to replace the template with a positive to include the process of PHP code.It doesn't actually compile every request, so performance is acceptable.
Template files and PHP program files are compiled by the template
The data table structure of level Two classification is as follows:
The PHP code is as follows
Copy Code code as follows:
/**
@ article classification with two-level classification
@ param int $rootnum--Number of first class categories
Functional comparison of the whole small page, pass a few parameters up on the line, the output of the calculation after the array, nothing new, but added a shortened page number, the results are pressed to an array, easy to output and call. A
The PHP designer, who just started contacting the template engine, will find it hard to hear Smarty. In fact, the author is no exception, did not dare to touch. But later, when parsing XOOPS's program architecture, it was not difficult to begin to
1.tpl
{block name = ' title '}{/block}
{block name = ' Content '}{/block}
{block name = ' footer '}{/block}
2.tpl
{extends file= ' 1.tpl '}
{block name= ' title '} I am the title {/block}
{block name= ' content '} I am the contents
Common 20 variable operators in smarty * use Syntax: {variable name | Operator :}* Capitalize --- uppercase letters* Count_characters --- calculates the number of characters* Cat --- connection string* Count_paragraphs --- calculate the number of
This article mainly introduces the usage of smarty variable modification in php, and analyzes common techniques of smarty template variable modification. For more information, see the example below. Share it with you for your reference. The specific
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.