Created
November 16, 2016 04:30
-
-
Save exileed/824c3ca85143ec1e0011d60a22c51a6b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$bytesCopied = stream_copy_to_stream($source, $target); | |
fclose($source); | |
fclose($target); | |
unset($source, $target); | |
if (!is_file($targetFile)) { | |
throw new Exception(''); | |
} | |
if($bytesCopied !== filesize($originFile)){ | |
throw new Exception(''); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment