When extracting Fckeditor, use the followingPHP uses $ _ POST ['P _ info'] to obtain the value of FCKeditor.Supplement:1. The basepath path must be the same as the include path above. Otherwise, the file cannot be found)In addition, if you want to
The data table structure of level 2 classification is as follows:
Copy codeThe Code is as follows: PHP code is as follows:
/**
@ Document category includes Level 2
@ Param int $ rootnum -- number of hash classes
@ Param int $ childnum -- number
PHP's Smarty template engine
PHP is an embedded HTML scripting language, in order to separate the HTML and PHP code, the so-called logical layer and the presentation layer, which is the purpose of the template engine. In order to achieve this
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 correct, the following key to look at the template file, may be the reason for
Without using the Smarty template engine, we all edit the PHP program and the page template together, like the following source code:
The code is as follows
Copy Code
$title = "Deep smarty template engine working
However, according to my experiment, if you do not delete a place, the resulting document opened in Excel, it will be an error!
Delete all strings like this: ss:expandedcolumncount= "5" on the line!
Example:
Just fill in some data, then submit,
First, use the cache
To turn on the Smarty cache, simply set the caching to True and specify Cache_dir.
Use Cache_lefetime to specify the cache lifetime, in seconds
To generate multiple different caches for the same page, add a second parameter
For Web sites with large access traffic and no need for timely updating of data, full use of caching technology can effectively reduce server pressure. Powerful caching techniques are also built into the Smarty template engine, and the Smarty
EQ equals,
NE, neq are not equal,
GT greater Than,
Lt is less than,
GTE, GE is greater than equals,
LTE, le less than equal,
Not non, mod modulo.
is [not] a div by can be divisible by a number,
is [not] even an even number,
$a is [not] even by $b
A simple realization of the color word
The above program just expresses some of the basic principles of color words, to achieve more complex and beautiful color words, all you have to do is change the font, change the font color, add some
Template Inheritance (Content page Inherits master page): Implements code reuse.
Resolving code reuse issues:Scenario 1: Use include all (include the equivalent of copy and paste, which will form a large number of the same page, occupy
1,smarty Cache Configuration:
Copy Code code as follows:
$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
Using Smarty to do the template processing class is currently the choice of most PHP sites, because it is powerful, and ADODB with very good, handled is handy. But whether it is smarty, or ADODB, because the function is powerful, class library
In the development of PHP Web site for the promotion and SEO needs, need to site for the whole station or local static processing, PHP generated static HTML page has a variety of methods, such as the use of PHP templates, caching, such as the
What is php static The simple understanding of PHP static is to make the site generated pages in the form of static HTML in front of visitors, PHP static separation of pure static and pseudo static, The difference between the two is that 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.