mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 23:22:48 +08:00
取消File类的uniqid规则 改为自己传入即可
This commit is contained in:
@@ -123,9 +123,6 @@ class File extends SplFileObject
|
|||||||
$savename = call_user_func_array($this->rule, [$this]);
|
$savename = call_user_func_array($this->rule, [$this]);
|
||||||
} else {
|
} else {
|
||||||
switch ($this->rule) {
|
switch ($this->rule) {
|
||||||
case 'uniqid':
|
|
||||||
$savename = uniqid();
|
|
||||||
break;
|
|
||||||
case 'md5':
|
case 'md5':
|
||||||
$md5 = md5_file($this->getRealPath());
|
$md5 = md5_file($this->getRealPath());
|
||||||
$savename = substr($md5, 0, 2) . DS . substr($md5, 2);
|
$savename = substr($md5, 0, 2) . DS . substr($md5, 2);
|
||||||
|
|||||||
Reference in New Issue
Block a user