Files

 <?php


$fname="file1.txt";


$fptr=fopen($fname,"r");


$content=fread($fptr,filesize($fname));


$fptw=fopen("file2.txt","w");


fwrite($fptw,$content);


echo"<strong>the content copied in file2 is:</strong> <br>".$content;


fclose($fptr);


fclose($fptw);


?>

Comments

Popular posts from this blog

Web

Lab 1 ai