1, year-month-dayEcho date ('Y-m-J ');2007-02-6Echo date ('Y-n-J ');07-2-6Uppercase Y indicates four digits of the year, while lowercase y indicates two digits of the year;Lowercase m indicates the number of the month (with the leading digit), while
I want to extract html images. The code is as follows:Copy code The above address. I want to extract all the addresses that contain 'ico 'and ignore them. For correction, some images are extracted. Some images are not extracted.Example: The
The code is as follows:Copy code Var http_request = false;Function send_request (url) {// initialization, specifying the processing function and sending the request functionHttp_request = false;// Start initializing the XMLHttpRequest objectIf
[Select sorting: The second number to the nth number are compared with the first number, and the third number to the nth number are compared with the second number, and exchanged until the sorting is complete] The code is as follows:Copy code
Let's take a look at the simplestThe following is the code implemented by php. xxx.mp3 is the actual address of your music file. Only the php address is transmitted during external communication. The mp3 address is not publicly available. The code
ForPhp array sortingMany functions are provided in php. I will list them below, which can be supplemented by incomplete functions.The sort () function is used to sort array units from low to high.The rsort () function is used to sort array units
Project structure:Start searching: search for keywords here ("big" "this ")Start searching: search for keywords here ("big" "this ")Search results: highlightedDatabase structure required by the project:Database Connection file The code is as
There are two methods to reference files: require and include. The two methods provide different elasticity.The use of require is as follows: require ("MyRequireFile. php ");. This function is usually placed at the beginning of the PHP program.
The strtr () function converts special characters in a string.SyntaxStrtr (string, from, to) orStrtr (string, array)*/ The code is as follows:Copy code $ Addr = strtr ($ addr, "", "aao"); // The first call method.$ Trans = array ("hello" => "hi",
Regular expression The code is as follows:Copy code ^ [_. 0-9a-z-] + @ ([0-9a-z] [0-9a-z-] +.) + [a-z] {2, 3} $ In this regular expression, "+" indicates that one or more strings appear consecutively. "^" indicates that the next string must
The code is as follows:Copy code /*************************************** **************************************** ****** Perfect paging class, which can be customized (perfect for high-fat teachers), O (& cap ;_& cap;) O haha ~) *****************
Preface:PHP supports operations on various types of databases, and also provides rich operation methods for file operations, many of my friends are still operating on files, but sometimes there are still many puzzles and doubts when operating on
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