Php supports four tag styles:1)Echo "this is an xml style Mark"; // recommended?>2)3)4)Echo "this is an ASP-style Mark ";%>/*To use the short style and asp style, you need to configure it in php. ini, and then set short_open_tag and asp_tags to ON*/
Make Logical judgments. Currently
Divisibleby null even odd sameas constant defined empty
DivisiblebyCheck whether it can be divisible
{% If loop. index is divisibleby (3) %}...{% Endif %}{% If loop. index is divisibleby (3) %}...{% Endif
Currently, the supported filters include:
Date format replace number_format url_encode json_encode convert_encoding title capitalize nl2br upper lower striptags join reverse length sort default keys escape raw merge
Date FilterThe time zone is
I wrote several articles about twig .. I haven't written a quick start or something. Write now
SummaryThe twig template contains common extension files, and does not contain special extension names. You can use either. html. htm. twig.The
The following is a summary of several character functions in PHP: 1) ucfirstChange the first letter to uppercase, for example$ String = "this is my web development blog "; Echo ucfirst ($ string ); // Output: This is my web development blog 2)
PHP can easily generate and read XML files. PHP mainly reads and writes XML through DOMDocument, DOMElement, and DOMNodeList. The following describes how to use these classes.
1. generate an XML fileFor the following XML file.
[Html] MySql database
In mysql: UNIX_TIMESTAMP (), UNIX_TIMESTAMP (date)If no parameter is called, a Unix timestamp ('2017-01-01 00:00:00 'seconds after GMT) is returned as an unsigned integer. If you use date to call UNIX_TIMESTAMP (), it will return the parameter value
The browser and server communicate with each other over the connectionless HTTP protocol. connectionless programs are characterized by client requests to the server. The server outputs the corresponding program according to the request, persistent
1./ckeditor/config. js, configuration file. If you do not want to write too much, you can directly write the default configuration (language, menu bar, width). You can configure it in Baidu config if necessary.
Config. language = 'en ';Config. skin =
I. HTML page to UTF-8 encoding problem1. Add a line before the title after the head:The order must be inThe title may be garbled!2.html file encoding:Click the Editor menu: "file"-> "Save as", you can see the current file encoding, make sure the
PrefacePHP Chinese Garbled text is one of the common problems in PHP development. Chinese Garbled text sometimes occurs on the web page. Some are generated during MYSQL interaction and sometimes related to the operating system. The following is a
PrefaceReflecting on some of the recently written things, I feel a little bit
For coder that has learned java or C ++,
The syntax is meaningless, such as OOP and exceptions.
Instead of simply looking at the instance code,
If you don't understand it,
Array_rand () randomly retrieves one or more units from the array.
[Function]This function returns the specified number of array elements in an array.If only one function is retrieved, the key name of a random unit is returned. Otherwise, an array
Array_shift () removes a unit starting with an array.
[Function]This function will pop up and return a unit at the beginning of the array, then the length of the array is reduced by oneAll number keys will be counted from scratch.If array is null or
Function sendHeader ($ num, $ rtarr = null ){Static $ sapi = null;If ($ sapi === null ){$ Sapi = php_sapi_name ();}Return $ sapi ++;When reading the PW source code, I found that the setHeader () function uses the static keyword. It is strange that
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service