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, ∼2529🔥, 0💬
Popular Posts:
How to use .NET CLR Types in Azure API Policy? By default, Azure imports many basic .NET CLR (Common...
Where to find tutorials on Using Azure API Management Publisher Dashboard? Here is a list of tutoria...
What properties and functions are supported on requests.models.Response objects? "requests" module s...
How to install "The Windows SDK version 8.1"? I need to build my Visual Studio C++ applications. If ...
How To Truncate an Array in PHP? If you want to remove a chunk of values from an array, you can use ...