In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces how to get the current time of time in php, which has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand it.
In PHP, the time () function can be used in conjunction with the date () function to get the current time, and when the parameter of the date () function is set to "'h _ date () s'", it can get the current time, with the syntax "date ('h _ lv _ I _ v), time ();".
This article operating environment: Windows10 system, PHP7.1 version, Dell G3 computer.
How does time get the current time in php?
The time () function returns the number of seconds in the current time since the Unix era (January 1 1970 00:00:00 GMT).
The syntax is:
Time ()
Return value:
Returns an integer containing the Unix timestamp of the current time.
The date () function is used to format the time / date.
The date () function formats the timestamp into a more readable date and time.
Grammar
String date (string $format [, int $timestamp])
Parameter description
Format is required. Specifies the format of the timestamp.
Timestamp is optional. Specify a time stamp. The default is the current date and time.
Examples are as follows:
The output is the current time
Thank you for reading this article carefully. I hope the article "how to get the current time of time in php" shared by the editor will be helpful to you. At the same time, I also hope you will support us and follow the industry information channel. More related knowledge is waiting for you to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.