Suppose there is a file (test.txt) with content.
testing php data
employee data
country data
I want to write this content in the /tmp dir of a remote linux machine. I am using following code
// $con contains all content of the text.txt file
$con = file_get_contents("C:/wamp/www/test.txt");
// $ssh is the sshobject for the remote machine
$ssh->exec('echo "$con" > /tmp/text1.txt');
It creates a empty file on the remote machine. What should I use for make copy of content on remote machine ?
You should write this code