PHP/*First, what is Smarty?smarty is a php template used to write a template engine, it provides a separation of logic and external content, in brief, the purpose is to use a PHP programmer with the art separation, the use of programmers to change the logic of the program content does not affect the design of the art p
arguments corresponds to the parameter one by one. If there is no default parameter, the corresponding argument is not given an error. When there is a default parameter behind a function's argument group, the omission is not an error at this time, and the function will participate in the operation by default parameters.5. Now look at the case where the parameter is set to null and the argument is empty.1 Public"-//w3c//dtd XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-tran
Php develops the article internal chain, replacing the rule with a problem as the internal chain method, you can think of replacing nbsp; set the internal chain word, such as the nbsp; replace "Spring Festival holiday" with " nbsp;" lt; a nbsp; href = '##' gt; Spring Festival holiday lt;/a gt; ", etc. this method may come, but the fact is that there may be no internal link for php development, which
Before explaining how to use tmd_tpl, I want to explain why I want to re-invent the wheel. Let's start with the contributions made by the so-called PHP template engine in this world. Speaking of the template engine in the PHP field, it is imperative to take the Smarty tool,
This silly template
Three tricks to make your PHP engine run at full speed. As a popular Web programming language, the biggest advantage of PHP is speed. PHP4 is already doing very well in this regard, and you can hardly find a script programming language that is faster than it. However, if you are a popular Web programming language, the biggest advantage of
){ - Echo $a+$b+$c; - } - +ASD (3,7); - + A?> at -The result is:1 15Conclusion: If there is a default parameter, the argument can not be given. The order of the arguments is in the order of the formal parameters. If there is a default parameter after the argument in the function argument, the argument can be given without the corresponding parameter. The function will be evaluated by default parameters.4. Let's look at one more situation. At this time three parameters, the default paramet
When learning development, we need to know some common sense. For example, variable naming rules are a very important habit, if you develop a good naming convention for variables, the teams you work with will be more likely to accept you.
1. Class Name
(1) Use the camel naming method (this is common in almost all languages)
(2) Try to have less than 3 words
(3) do not use uppercase letters for all acronyms. Eg: Use GetHtmlStatic instead of GetHTMLStat
Manual development of PHP template engine 1 (35), php Template
The template is called TPL, which imitates the smarty template engine.
The template we call is a Web template. It is a page written in a language consisting of HTML tags. However, there are also ways to express the dynamically generated content (parsing tag
(1) Naming rules:including variable names, class names, interface name functions, and so on① Basic Rules:Use only lowercase letters, underscores, or numbersNumber cannot startCannot repeat with environment and system keywords (for example, if,else,function)② Hump Type: Name Nameschool myfatherPascal named: MyName nameschool MyftherUnderline interval: My_name my_father(2) The method of passing values between variables:① in PHP, the default is value pas
Yii is a component-based, high-performance PHP framework for developing large Web applications. Yii is written in strict OOP and has perfect library references and comprehensive tutorials.
No more nonsense to say, directly to everyone paste code.
Full Example:
Public $password 2;//A non-database field, but public $verify is required in view; Mobile phone authentication code public $FJG;
Forgotten number/** * Map database table nam
Yii is a high-performance, component-based PHP framework for developing large Web applications. Yii is written in strict OOP, with well-established library references and comprehensive tutorials.
Not much nonsense to say, directly to everyone put the code.
Complete Example:
Public $password 2;//fields for non-databases, but public $verify are required in view; Phone verification Code Public $FJG; Forgot number/** * Map database table name * @retu
Storage rules for PHP array key
Just write the program encountered the problem of PHP array value, found that the string and number of words taken out is the same.
key can be an integer or string. value can be of any type.
In addition, key will have the following casts:
A string containing a valid integer value is converted to an integral type. For exampl
Storage rules for PHP array key
Just write the program encountered the problem of PHP array value, found that the string and number of words taken out is the same.
key can be an integer or string. value can be of any type.
In addition, key will have the following casts:
A string containing a valid integer value is converted to an integral type. For exampl
Smarty
Smarty is characterized by compiling the template into a PHP script and then executing the scripts. Very soon, very flexible.
Heyes Template Class
A very easy-to-use but powerful and fast template engine that helps you separate page layouts and designs from your code.
Fasttemplate
A simple variable interpolation template class that parses your template and separates the value of the variable from t
basic statements public function C_var () {} // Parsing of static JavaScript public function C_staticfile () {}}The approximate structure of the compiled class is the above, the work of the compiler class is based on the configuration of the file, the written template file according to the rules, replace and then output to the File. The contents of this file are mixed with PHP and html, bu
Is there a simple and small PHP template engine? I recently wrote my own PHP framework in the template and studied it for a few days. starting with URL routing, I got the template engine and stopped. Because I have never worked on a template engine and have been using other
Smarty
Smarty is characterized by compiling the template into a PHP script and then executing the scripts. Very quickly, very flexible.
Heyes Template Class
A very easy to use, but powerful and fast template engine, it helps you to separate the layout and design of the page from the code.
Fasttemplate
A simple variable interpolation template class that analyzes your template and separates the values of th
Use PHP functions to implement amp; quot; bridge amp; quot; AJAX engine and RSS content. RSS aggregators are especially suitable for applications built using standard AJAX engines. However, it is difficult to implement cross-origin AJAX requests for RSS Feedback. In this article, I will use RSS aggregator as an application that is particularly suitable for building with the standard AJAX
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.