However, according to my experiment, if you do not delete a place, the generated document opened with Excel, will be error!
Delete all the strings like this: ss:expandedcolumncount= "5" on the line!
Example:
Fill in the data, then submit,
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
What is a template? My understanding is to separate the interface from the implementation code,
This aims to separate the work of the artist and the programmer, improve work efficiency, and facilitate later maintenance.
PHP also has many templates,
Equal eq,
Ne, neq are not equal,
Gt>,
Lt is less,
Gte and ge are greater than or equal,
Less than or equal to lte and le,
Not non. mod modulo.
Is [not] Can div by be divisible by a certain number,
Is [not] whether the even is an even number,
$ A is [
Generally, the display of website pages inevitably involves the interception of sub-strings. At this time, truncate is useful, but it is only suitable for English users. For Chinese users, if you use truncate, garbled characters may occur. In
Ec (2); 1. To enable the smarty cache by using the cache, set caching to true and specify cache_dir. use cache_lefetime to specify the cache survival time. In seconds, multiple different caches must be generated for the same page. Add the second
This article describes how to use the Smarty template of php. For more information about how to use the smarty template, see this article. The details are as follows:
I,Annotations in the template
Every Smarty template file is developed by
For more information about PHP's Smarty learning, see the documents on the network. you can use Smarty to perform a simple test:
1. decompress the Smarty file to the website directory, such as libs.
2. create the templates, templates_c, configs,
Example of condition judgment usage of the smarty template in php, and the smarty template. In php, the smarty template condition judgment usage example. The smarty template in this article describes the usage of the smarty template condition
Smarty Common 20 variable operators * Use syntax: {variable name | operator:}
* Capitalize---initial capital letter
* Count_characters---Count of characters
* Cat---connection string
* Count_paragraphs---Calculation of the number of paragraphs
*
Configuration of the 1,smarty cache:
$smarty->cache-dir= "directory name"; Create a cache directory name
$smarty->caching=true; Cache is turned on, false when caching is not valid
$smarty->cache_lifetime=60; Cache time in seconds
Use and purge of
Chinese intercept modifier.cn_truncate.php
Copy CodeThe code is as follows:
function Smarty_modifier_cn_truncate ($string, $strlen = A, $etc = ' ... ',
$keep _first_style = False)
{
$strlen = $strlen;
$string = Trim ($string);
if (strlen ($string)
Why use the Smarty template to submit articles and pictures using the Kindeditor compiler, the MySQL database storage data becomes: fgdjhgkdjsgd
Then the extracted data becomes
FGDJHGKDJSGD, why not display pictures and articles? Request a master
The Include function of smarty can be used to introduce a common part,
For example, A.tpl .....
My question came, if A.TPL is not entirely static HTML, there is also a part of the need to assign variables,
So when B.tpl introduced A.TPL,
B.TPL
Look at the results first--
The page source code is as follows:
Analysis of the code, after checking index_config.php (smarty Connection file), index.php files are error-free, the following focus on the template file, perhaps the reason is on
The following describes the features of the Smarty template engine:
1. Speed: The program written in Smarty can get the maximum speed improvement, which is relative to other template engine technology.
2. Compiled: The program written in Smarty is
Refer to the data on the network, using Smarty can be easily tested:
1. Unzip the Smarty to the site directory, such as the name Libs.
2. Create a Templates,templates_c,configs,cache directory
3. Build test page: index.php
Require "main.php"
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.