Last active
April 20, 2024 19:59
-
-
Save mcsee/75cb385ad949635913e898aa6a030b95 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
<? | |
$sourceFile = 'C:\temp\source.txt'; | |
$destination = 'C:\temp\destination :txt'; | |
// The filename is simplified | |
// and might come from a programmatic construction | |
$copyWasSuccessful = copy($sourceFile, $destination); | |
if (!$copyWasSuccessful || !$file_exists($destination)) { | |
// Don't trust the function result. Handle the postcondition error | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment