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, 2010🔥, 0💬
Popular Posts:
Where to get the detailed description of the json_encode() Function in PHP? Here is the detailed des...
Where to find tutorials on PHP language? I want to know how to learn PHP. Here is a large collection...
How to install "C++/CLI Support" component in Visual Studio? I need to build my Visual Studio C++/CL...
How to use the "send-one-way-request" Policy statement to call an extra web service for an Azure API...
How to create a new API on the Publisher Dashboard of an Azure API Management Service? If you are ne...