PHP's function on time

Source: Internet
Author: User

//返回1970年1月1日零点以来的秒数.    //定义为从格林威治时间1970年01月01日00时00分00秒(北京时间1970年01月01日08时00分00秒)起至现在的总秒数。time();   //返回当前时间的时间戳 date("Y-m-d",time())    //将时间戳 转化为标准时间getdate//取得日期  返回一个包含时间元素的数组gmdate()  //格式化时间 gmdate  与date类似,但先将时间转换成格林威治标准时. mktime(小时数,分数,秒数,月,日,年); //返回一个时间值filectime("a.txt");  //取得文件的创建时间fileatime("a.txt");  //返回文件的最后改变时间 数据的任何改变,包括改变权限,所属组,拥有者等; filemtime("a.txt");  //返回文件的最后修改时间 指的是对文件内容的修改

PHP's function on time

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.