forked from leftypol/leftypol
fs.php: add move_or_copy_uploaded
This commit is contained in:
parent
461650a665
commit
3eca4bccc0
1 changed files with 7 additions and 0 deletions
|
@ -8,3 +8,10 @@ function link_or_copy(string $from, string $to) {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function move_or_copy_uploaded(string $from, string $to) {
|
||||
if (!\move_uploaded_file($from, $to)) {
|
||||
return \copy($from, $to);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue