tasairis wrote:Yeah... Saying "I need the script" kinda implies that you're waiting for us to do the work. That's not how it goes.
We'll offer advice, suggestions, comments on a design you've come up with or code you've imagined, but we won't do it for you.
On that note,
Are you able to SSH into both of the remote machines?
Hi i have the code here
$dst_dir = "/mnt/httpd/vhosts/pmstestdomain.com/test/"; //for example absolute path i gave in this way
$src_dir = "--------";
function ftp_copyAll($conn_id, $src_dir, $dst_dir) {
if(is_dir($dst_dir)){
return "<br> Dir <b> $dst_dir </b> Already exists <br> ";
}else{
$d = dir($src_dir); // unable to read this absolute path - query fails here
ftp_mkdir($conn_id, $dst_dir); echo "creat dir <b><u> $dst_dir </u></b><br>";
while($file = $d->read()) {
if ($file != "." && $file != "..") {
if (is_dir($src_dir."/".$file)) {
ftp_copyAll($conn_id, $src_dir."/".$file, $dst_dir."/".$file);
} else {
$upload = ftp_put($conn_id, $dst_dir."/".$file, $src_dir."/".$file, FTP_BINARY);
echo "creat files::: <b><u>".$dst_dir."/".$file ." </u></b><br>";
}
}
ob_flush() ;
sleep(1);
}
$d->close();
}
return "<br><br><font size=3><b>All Copied ok </b></font>";
}
Pls help me.hope u understood the code.FTP login and FTP connection are connected when i give the details