Home  >  Article  >  Backend Development  >  PHP image upload uses microseconds as file name, _PHP tutorial

PHP image upload uses microseconds as file name, _PHP tutorial

WBOY
WBOYOriginal
2016-07-13 10:20:28809browse

PHP uses microseconds for image upload as file name,

$m = microtime ();
$mtime = explode(' ',$m);
$mtime1 = $mtime[1];
$mtime2 = substr($mtime[0], 2, 6);
$pic_time = "{$mtime1}{$mtime2}";

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/867002.htmlTechArticlephp uses microseconds for file names when uploading images, $m = microtime (); $mtime = explode(' ' ,$m); $mtime1 = $mtime[1]; $mtime2 = substr($mtime[0], 2, 6); $pic_time = "{$mtime1}{$mtime2}";...
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