Tools, FAQ, Tutorials:
Copying a File in PHP
How To Copy a File in PHP?
✍: FYIcenter.com
If you have a file and want to make a copy to create a new file, you can use the copy() function. Here is a PHP script example on how to use copy():
<?php
unlink("/temp/myPing.exe");
copy("/windows/system32/ping.exe", "/temp/myPing.exe");
if (file_exists("/temp/myPing.exe")) {
print("A copy of ping.exe is created.\n");
}
?>
This script will print:
A copy of ping.exe is created.
⇒ Putting Directory Entries into an Array in PHP
2016-11-20, ∼2770🔥, 0💬
Popular Posts:
How to add request URL Template Parameters to my Azure API operation to make it more user friendly? ...
Where to find tutorials on JSON (JavaScript Object Notation) text string format? I want to know how ...
How to create the Hello-3.0.epub package? I have all required files to create Hello-3.0.epub. To cre...
How To Copy Array Values to a List of Variables in PHP? If you want copy all values of an array to a...
Where to find EPUB Sample Files? Here is a list of EPUB sample files collected by FYIcenter.com team...