提交 201109bb 编写于 作者: D devil_gong

文件上传rand超出范围

上级 bd0b6934
......@@ -311,7 +311,7 @@ class Uploader
$format = str_replace("{filename}", $oriName, $format);
//替换随机字符串
$randNum = rand(1, 10000000000) . rand(1, 10000000000);
$randNum = rand(1, 1000) . rand(1, 1000) . rand(1, 1000);
if (preg_match("/\{rand\:([\d]*)\}/i", $format, $matches)) {
$format = preg_replace("/\{rand\:[\d]*\}/i", substr($randNum, 0, $matches[1]), $format);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册