Home >Backend Development >PHP Tutorial >php 创建以UNIX时间戳命名的文件夹(示例代码)_PHP

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

WBOY
WBOYOriginal
2016-06-01 11:55:17915browse

unix时间戳

实例如下:
复制代码 代码如下:
  //Get   timenow  

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

  //Creat   Dir  
  $testdir="./".$addtime."/";  
  if(file_exists($testdir)):  
  else:  
  mkdir($testdir,0777);  
  endif;  
  ?>
Statement:
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