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, 1770🔥, 0💬
Popular Posts:
How to use the "find-and-replace" Policy Statement for an Azure API service operation? The "find-and...
Where to find tutorials on HTML language? I want to know how to learn HTML. Here is a large collecti...
What is EPUB 3.0 Metadata "dc:publisher" and "dc:rights" elements? EPUB 3.0 Metadata "dc:publisher" ...
How to read RSS validation errors at w3.org? If your RSS feed has errors, the RSS validator at w3.or...
How to use the Atom Online Validator at w3.org? w3.org feed validation service is provided at http:/...