在php中要知道本月的天数,用什么函数可以实现(In PHP, you know the number of days in the month, and what functions can be used to implement it).doc
- 1、本文档共10页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
在php中要知道本月的天数,用什么函数可以实现(In PHP, you know the number of days in the month, and what functions can be used to implement it)
在php中要知道本月的天数,用什么函数可以实现(In PHP, you know the number of days in the month, and what functions can be used to implement it)
Ask:
Excuse me:
In PHP, to know the days of the month, what function can be achieved?
PHP seems to have no such function.
Consult! Thank you
______________________________________________________________________________________________
Answer 1:
(getdate) can be obtained in the first few days, the specific use of the following:
$array_time=getdate;
Echo $array_time[mday]
An array of mday expression in the first few days of the month
______________________________________________________________________________________________
Answer 2:
Write your own.
______________________________________________________________________________________________
Answer 3:
Not the first few days
How many days are for the month
Any input a year of any month, shows you how many days that month!
______________________________________________________________________________________________
Answer 4:
There is a cal_days_in_month function in the Calendar grammar, you can find any input a year of any month, the month shows you how many days!
Ha-ha
______________________________________________________________________________________________
Answer 5:
Date
(PHP 3, PHP 4)
Date - a local time / date format
Explain
String date (string format, int timestamp])
Returns a string according to a given integer timestamp format string generated. If not given the time stamp is the use of the current local time.
Note: the typical timestamp range effective Greenwich time 20:45:54 in December 13, 1901 to 03:14:07 in January 19, 2038. (this range with 32 minimum and maximum value of a signed integer). In the Windows system to limit this range from January 1, 1970 to January 19, 2038.
The expression of string time into a time stamp, you should use the strtotime (). In addition, some database has some functions the time format conversion time stamp (e.g. MySQL UNIX_TIMESTAMP function).
The
您可能关注的文档
- 生活中的急救法(First aid in life).doc
- 王安康论治肝硬化腹水经验(Wang Ankang's treatment of ascites due to cirrhosis).doc
- 生活之道(Way of life).doc
- 珍珠粉的全部用法(The full usage of pearl powder).doc
- 生活妙招(Life coup).doc
- 生活急救常识(Life emergency tips).doc
- 生物地理总复习(Biogeography review).doc
- 生物基本知识大全(Basic knowledge of Biology).doc
- 生物期末试题(Biology final examination).doc
- 生物论文(Biological papers).doc
文档评论(0)