问题
I am trying to copy a video file which has a size of 5Gbs.
I use this simple line:
copy($in, $out);
But somehow the copied file has only a size of ~700 Mb.
Is there a limit which the copy function has.
Are there some other ways to copy files using php?
回答1:
Ok I think I found a solution, I did following:
exec('copy ' $in . ' ' . $out);
This copied the whole file properly.
I am not sure why exactly this works.
My wild guess would be that copy()
copies files immediately even if there a some changes and the command probably waits until there are no changes.
来源:https://stackoverflow.com/questions/41591247/php-copy-only-copies-part-of-file