Home > php教程 > php手册 > php 创建以UNIX时间戳命名的文件夹(示例代码)

php 创建以UNIX时间戳命名的文件夹(示例代码)

WBOY
Release: 2016-06-06 20:24:09
Original
1024 people have browsed it

这篇文章主要介绍了php创建以UNIX时间戳命名的文件夹(示例代码)。需要的朋友可以过来参考下,希望对大家有所帮助

实例如下:

复制代码 代码如下:


  //Get   timenow  

  $addtime=date("Ymd",time());  

  //Creat   Dir  
  $testdir="./".$addtime."/";  
  if(file_exists($testdir)):  
  else:  
  mkdir($testdir,0777);  
  endif;  
  ?>

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template