TY_BCS_PHP_SLIP 22_1



Slip no. 22. Write a PHP Program to read two file names from user and append content of first file into second file.
PHP file :
<?php
$sourceFname="test.txt";
$fp1=fopen("test.txt","r");
$fp2=fopen("test2.txt","a");
fwrite($fp2,fread($fp1,filesize($sourceFname)));
echo "Data Copied";
?>

No comments:

Post a comment

Note: only a member of this blog may post a comment.