笔记
Renew 全栈工程师
全栈开发工程师
展开
-
php-计算两个时间差
官方代码 $january = new DateTime('2010-01-01'); $february = new DateTime('2010-02-01'); $interval = $february->diff($january); // %a will output the total number of days. echo $interval->format('%a total days')."\n"; // While %d will only output the nu原创 2020-09-16 14:09:40 · 136 阅读 · 0 评论 -
php 遍历目录,生成目录下每个文件的md5值并写入到结果文件中
#1.不多说,复制代码 <?php /** * @author Renew。 * @date 2019-12-15 * */ class FileMD5 { /** * 要批量md5加密的文件目录 * @var string */ public static $appFolder = ""; /** * 生成md5的文件名 * @var string */ public static $genera原创 2020-09-06 23:54:16 · 238 阅读 · 0 评论