PHPYou can process strings in a variety of ways, but sometimes you need to select the simplest and ideal solution. This article lists 10 common cases of string processing in PHP and provides the most ideal processing method.
1. determine the length
1. DateTime numeric typeSystem. DateTime currentTime = new System. DateTime ();
1.1 take the current year, month, day, hour, minute, second
CurrentTime = System. DateTime. Now;
1.2 get current year
Int Year = currentTime. Year;
1.3 take the current
1. DOM
WEB standards are currently a hot topic, but the following is a document. all [] that does not comply with the standards. DOM--DOCUMENT object model Document object model provides methods to access document objects. for example, if you want
Document directory
Javascript Summary-Div
Javascript Summary-Div
At work, I occasionally work as a front-end. Every time I have to re-learn some simple JavaScript and HTML tags, I will summarize them a little today, mainly for div operations, it
CSS selector:
1. Tag selector: set the same CSS format for all HTML tags.
2. Category selector: for example. class {color: green; font-size: 20px} class is the class name, color and font-size are the attributes, and green and 20px are the values
1. You can use a filter to modify the display of variables. The filter format is {Variable | filter}. Pipeline symbol '|' indicates that a filter is used.2. The filter can be chained, for example: {text | escape | linebreaks }}3. The filter can also
The innertext feature is used to modify the text between the start tag and the end tag. For example, assume that there is an empty element and you want to change it to new text for the Div. . When using DOM:
Odiv. appendchild (document.
Your project should have a good start point. A group should lead the customer into the demand inspiration stage and you should write the Software Requirement Specification. This description is a little big, but the customer will pay great attention
Why does this chapter appear? Because XML is so important and widely used! Whether it is data storage or other aspects, such as configuration files. XML is a mechanism for encoding data independent from any programming language. In the field of data
Smarty is a PHP template engine that separates logical programs from external content and provides an easy-to-manage method.Smarty requires the Web server to run php4.0.6 or later.The smarty library file is required for smarty installation. You can
strings and regular Expressions in PHP, PHP regular expressions
I. Characteristics of String types
1, PHP is a weakly typed language, other data types can be directly applied to string function operation.
1:
Output 345Output 345Look for Hello
A detailed description of the string and regular expressions in PHP, with a detailed description of the PHP regular expression
I. Characteristics of String types
1, PHP is a weakly typed language, other data types can be directly applied to string
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.
PHP security guard
PHP code Security and Xss,sql injection are very useful for all types of websites, especially the UGC (User Generated Content) website, forums and e-commerce sites, which are often the hardest hit areas for XSS and SQL injection.
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.
Document directory
1. html naming and format
2. CSS code and HTML code separation
3. Write standard HTML code
1. Use appropriate labels in appropriate places
2. Add necessary Meta to the page
3. Do not omit attributes of some labels.
1. the
Although Dom provides the ability to dynamically modify documents, this is not enough for developers. Ie4.0 introduces two features for all elements to facilitate document operations. These two features are innertext and innerhtml.
The innertext
Guidance:
Programmers should be good at communication. The significance of code beautification is to reflect developers' respect for others. Good coding conventions can make the source code clear, easy to read, and accurate, it is more intuitive and
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.