AdodbZip1.1 has updated and updated the download address.
Smartyzip, a Smarty loading class
Setting parametersSmartyzip:: $zip _url = ' http://www.smarty.net tutorial/distributions/smarty-2.6.26.zip '; [Set item]smarty zip file download
Using the DATE function in PHP to format the timestamp, you can use Date_format to implement the SmartySpecific usage:
The code is as follows
Copy Code
{$timestamp |date_fomat: "%y-%m-%d%h:%m:%s"}
Note: | No
I recently used the onethink officially published by thinkphp to set up the management backend. Because the company's previous code was written by smarty and there were more than 2000 templates, I was too lazy to use the think template engine to
How to use php functions in smarty
/**
* Use php functions in the smarty template engine
* By bbs.it-home.org
*/
Require 'libs/Smarty. class. php ';
$ Smarty = new Smarty;
$ Smarty->
Smarty Time Format (date_format[format date) is more powerful, and its parameters can even be MySQL or Unix timestamp. But there was a slight problem with formatting when you used it:
The code is as follows
Copy Code
For the beauty of the front end, I use the Smarty built-in truncate function for character length control, such as the title of some articles is too long, and in fact it is not necessary to fully display. Truncate can be intercepted, for example:
For the use of, think such display work, or to the template class is more appropriate. Work to use, feel such a display work, or to the template class is more appropriate. So write a plugin like this. /**
* Smarty Plugin
* @package Smarty
*
Smarty implements cascade menus as functions and thenFunction typeList0l () {Global $ lng;Echo " click the icon to expand the category ";$ SQL = "select * from xy_product_typelist where typeclass = 'pro' and typeid = 0 and lng = '$ lng'
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.