Answers for "save copy of variable php"

PHP
1

php copy file

// Will copy foo/test.php to bar/test.php
// overwritting it if necessary
copy('foo/test.php', 'bar/test.php');
Posted by: Guest on September-27-2021
5

php copy

<?php
$file = 'example.txt';
$newfile = 'example.txt.bak';

if (!copy($file, $newfile)) {
    echo "failed to copy $file...\n";
}
?>
Posted by: Guest on March-20-2020

Browse Popular Code Answers by Language