English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
PHP Filesystem Reference Manual
The copy() function copies a copy of the source file to the target location. If successful, it returns true; if failed, it returns false.
bool copy ( string source, string dest )
Copy a file from source to dest. If we copy a file without size, the copy() function can return false, but the file can be copied correctly.
<?php echo copy("/PhpProject/sample.txt"/PhpProject/sample1.txt"); ?>
Output Result
1