I have one file one.php
<?php //just a php function doen't have to do any thing with the question
function B(){
}
?>
Through php I want to read one.php as it is and write into two.php as it is..
Note– '<' getting converted into '$lt;'
Answer to it is
<?php
$text = file_get_contents("one.php");
file_put_contents("two.php", $text);
?>
Now further what I want is add one more php function say function A(){} to the content of one.php and write it into two.php
That’s fairly simple nowadays :-).
For more parameters to the methods, see the PHP.net documentation on file-get-contents and file-put-contents.