The date () function of PHP is used to format the time or date.
PHP Date () function
The PHP date () function formats the timestamp as a date and time that is more readable.
Grammar
Date (Format,timestamp)
Parameters
Description
This article mainly introduces the php mkdir () function to create secure permission settings for folders. in this case, the system umask affects the specified permission parameters of mkdir, which is smaller than expected, there is no such problem
In this paper, the Count function of PHP array is analyzed in depth. For everyone to make a reference, I hope to be helpful.
Count ()
The PHP count () function calculates the number of cells in an array or the number of properties in an object,
This article will introduce the use of levenshtein, a similarity calculation function of PHP.
Let's take a look at the levenshtein () function instructions in the manual:
The levenshtein () function returns the Levenshtein distance between two
The cURL library function of PHP captures web pages, POST data, and others. Whether you want to retrieve part of the data from a link or an XML file and import it to the database, you may simply get the webpage content, cURL is a powerful tool.
Question about the number_format function of php. echo number_format (88899626759579787, 0 ,'','');
Why is the output 88899626759579792?
Reply to discussion (solution)
I am also a newbie. I asked my mother, and she said the format was wrong!From
Probe into the anonymous function of PHP's closure (Closure), Closure
When it comes to closures, we have to think of anonymous functions, also called closure functions (closures), which seems to be the main implementation of PHP closures. Declaring
PHP's substr function fully simulates ASP's right function. some people say that substr can completely replace ASP's right function right & nbsp; (x) substr ($ str,-x); & nbsp; however, if x0 is used, it cannot be replaced at all. Is there any way
Echo "A", "B", "C"; Echo ("A"), ("B"), ("C"); Echo ("A", "B", "C"); // Error Echo "A". " B "." CThe dot is the result of connecting a string together and outputting the final connectionCommas are output sequentially, without concatenation of strings,
Talking about the function of php fopen to download remote files,
As follows:
// Download the attachment function get_file ($ url, $ folder = ". /") {set_time_limit (24*60*60); // set the timeout value $ destination_folder = $ folder. '/'; // File
The eval () function calculates the string according to the PHP code.Usage: eval (phpcode);Case 1:$a = ' name '; $b = ' my '; $d = ' $b $a is Helen '; Echo $d. " eval ("\ $d = \" $d \ ";"); echo $d. " ";Output Result:$b $a is helenmy name is
Generally when you need to use the time, we will declare:Header (' Content-type:text/html;charset=utf-8 ');Date_default_timezone_set (' PRC '); The people ' s Republic of China
A-"AM" or "PM"
A-"AM" or "PM"
D-A few days, two digits, if less
the difference between 1.echo and printThe functions of Echo and print in PHP are basically the same (output), but there are subtle differences between the two. There is no return value after the echo output, but print has a return value and returns
The crc32 function of php must be used with caution (otherwise it is a pitfall ).
I wrote a table sharding program a few days ago. The hash algorithm used is crc32. the table sharding function is as follows:Copy codeThe Code is as follows:Function _
The date () function of PHP is described in detail
1, year-month-dayecho Date (' y-m-j ');2007-02-6echo Date (' y-n-j ');07-2-6Uppercase Y represents the year four digits, while lowercase y represents the two digits of the year;Lowercase m
Https://www.cnsecer.com/4146.htmlHttp://www.jb51.net/article/71424.htmThe rules for a list of numbers are as follows; 1,1,2,3,5,8,13,21,34. What's the 30th digit number?function Fibonacci ($n) { $result = 1;//is returned when n
To set up commonly used Content-type://Defining the EncodingHeader(' Content-type:text/html;charset=utf-8 ');//AtomHeader(' Content-type:application/atom+xml ');//CSSHeader(' Content-type:text/css ');//JavascriptHeader(' Content-type:text/javascript
Chr
(PHP 4, PHP 5, PHP 7)
Chr-return a specific character
chr-returns the specified character
Descriptionchr($ascii)//Returns a one-character string containing the character specified by ascii.//返回相对应于 ascii
PHP like the rank function of Excel is also a reference to the code on the Internet, but there is no two-dimensional array in the case of rank ranking, so their code slightly changed a bit, you can run the experiment directly. ' 1 ', ' B ' = ' B '),
The function is defined like this:int Ord ( string $string )Returns string the ASCII value of the first character of a string.This function is a complementary function of Chr ().Try it:Echo Ord (' I ');Here can only return 230, I was saved by U8
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.