How did php get what date it is today?
This article mainly introduces "how to get today's date from php". In daily operation, I believe many people have doubts about how to get today's date with php. The editor has consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful for you to answer the doubt about "how to get today's date with php". Next, please follow the editor to study!
Php to get what is today's method: 1, create a PHP sample file; 2, through the "echo date ('d')" method to get the date of the day.
The operating environment of this paper: Windows7 system, PHP7.1, Dell G3.
How did php get what date it is today?
What's the date of the day when php gets it? what day is it?
The code is as follows:
Echo date ('y').''; / / current year echo date ('m').''; / / current month echo date ('d').''; / / current day echo date ('s').''; / / current second echo date ('w').''; / / current day of the week
Print as follows
At this point, the study on "how to get what date php is today" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!