Copying files : copy « File Directory « PHP
- PHP
- File Directory
- copy
Copying files
<?php
$source = "C:\\Apache\\logs\\error.log";
$dest = "C:\\error.bak";
if( copy( $source, $dest ) )
{
$msg = "Copied $source<br>to $dest";
}
else
{
$msg = "Unable to copy $source";
}
?>
<html>
<head>
<title>Copying files</title>
<head>
<body>
<?php echo($msg); ?>
</body>
</html>
Related examples in the same category