Home  >  Article  >  Backend Development  >  php creates a folder named with UNIX timestamp (sample code)_PHP tutorial

php creates a folder named with UNIX timestamp (sample code)_PHP tutorial

WBOY
WBOYOriginal
2016-07-13 10:37:10881browse

The example is as follows:

Copy code The code is as follows:

//Get timenow

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

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

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/736782.htmlTechArticleThe example is as follows: Copy the code as follows: ?php //Get timenow $addtime=date("Ymd",time ()); //Creat Dir $testdir="./".$addtime."/"; if(file_exists($testdir)): else: mkdir($testdir,07...
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