Wed Jun 24 2020

Copy File

PHP Scripting952 views

File Name: copy-file.php

<?php
	$source = "text.php";
   $destination = "test/newText.php";
	
	/* Copy file using copy()) */
   if(copy($source, $destination))
      echo "File copied successfully.";
   else
      echo "File could not be copied...Please try again!";
?>



/* Ouput */
File copied successfully!
Reference:

We use cookies to improve your experience on our site and to show you personalised advertising. Please read our cookie policy and privacy policy.