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, ∼2128🔥, 0💬
Popular Posts:
How To Open Standard Output as a File Handle in PHP? If you want to open the standard output as a fi...
Where can I download the EPUB 2.0 sample book "The Problems of Philosophy" by Lewis Theme? You can f...
Tools, FAQ, Tutorials: JSON Validator JSON-XML Converter XML-JSON Converter JSON FAQ/Tutorials Pytho...
What Is Azure API Management Service? Azure API Management as a turnkey solution for publishing APIs...
Where to find tutorials on OpenID? Here is a large collection of tutorials to answer many frequently...