| 联系我们 | 
             
            
              
                  网址:www.we0546.com邮箱:414787450@qq.com电话:4006966014地址:山东省东营市东营区西二路471号北海嘉园C座305号
                | 
             
           
		   			  
	   | 
       | 
      
	  
      
        
           | 
           | 
           | 
         
        
          |   | 
          | PHP时间戳和日期转换 |  | 来源:本站 点击数:2705次 更新时间:2018/3/2 15:34:11 |  
	日期转时间戳函数 strtotime()
 
	例如:strtotime('2010-03-24 08:15:42');
 
	strotime是非常灵活聪明的函数,可以识别中文,英文,数字 
strtotime("now"), "\n";  
strtotime("10 September 2000"), "\n";  
strtotime("+1 day"), "\n";  
strtotime("+1 week"), "\n";  
strtotime("+1 week 2 days 4 hours 2 seconds"), "\n";  
strtotime("next Thursday"), "\n";  
strtotime("last Monday"), "\n";  
strtotime("20170808 23:00:01"), "\n";  
 
	 时间戳转日期函数 date()
 
	 格式date(format,timestamp)
 
	 format 必需。规定时间戳的格式。  
 timestamp 可选。要转换的时间戳。 
 
	 举例::可以用date(‘Y-m-s h:i:s’, time());
 
 
	 注意:函数time() ,当期时间的时间戳函数
 
	 
  |  | 【刷新页面】【加入收藏】【打印此文】 【关闭窗口】 |  | 上一篇:使用PHPMAILER实现PHP发邮件功能 下一篇:分析submit、button和回车键提交数据几者之间的区别不同 |   
		   | 
            | 
         
         
		 
		
		
	   |