The criteria are mainly as follows:
Initial thoughts:
printf('%u',crc32(microtime(true)));
More: When uploading a file, I basically want to save the unique file name as named by the bootloader, so to avoid a name clash, I would like to put it in a directory with a unique name ...
[] . PHP id. .
:
+ uploader-name + 20090401 + 010000 // hhmmss + 013000 // hhmmss + 014500 // hhmmss ... + 20090402
, "a", "b", "c",... .. .
. , .
, . ( PHP), , , , .
, - "2009-Apr-01", "01:45 AM" ..
, Ruby :
require 'digest/md5' Digest::MD5.hexdigest(Time.now.to_s) => "f531384b3cc8c60b7c5b7ad087cb0ae4"
" ". , , ( ) , , , . , "".
- :
$salt='Whatever you want'; $folderName=SHA1($salt.date('U'));
('U') Unix Epoch (1 1970 00:00:00 GMT), , , , .
$salt ( ..).
( md5, sha) , , . , , script, , , , . , , .
OP, . , . 5 , - , . 15 , , , .
++ tmpfile tmpnum, cstdio (stdio.h), . tmpfile . , , , .
Source: https://habr.com/ru/post/1707447/More articles:https://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1707422/whats-a-good-plsql-source-code-analysis-tool&usg=ALkJrhgjyIZC4DuIsJO_xqgSYGile73Dxgнастраиваемые преобразователи сериализации для службы WCF - ajaxHow can I exclude the list of files (stored in a file) from the Ant file set? - antWhat is equivalent to SQL Server transactions in DB2? - sql-serverSearch Engines and Porting a Static Site to a Web Application - djangoEclipse RCP: how to display source code? - eclipse-rcphttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1707449/how-do-i-add-a-custom-startup-class-to-tomcat&usg=ALkJrhhwW6f_IrFRJIhfjh2gjdR9w-6UvgWhere to find a test HTTP server for modeling timeouts and error codes - javaXmlInclude or SoapInclude - web-servicesHow to insert some XML into XDocument using Visual Basic? - xmlAll Articles