Home > Backend Development > PHP Tutorial > 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
Release: 2016-07-13 10:37:10
Original
966 people have browsed it

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...
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 Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template