简体   繁体   中英

Moving Contents of One Domain to another Domain

How to copy The contents of one domain to another domain using php I used this command

if (!($stream = ssh2_exec($con, $movePathCMD))) {

                die("fail: unable to execute command");
            } else {

                // collect returning data from command

                  stream_set_blocking($stream, true);
                $data = "";
                while ($buf = fread($stream, 4096)) {
                    $data .= $buf;
                }
                fclose($stream);
            }

?> But its not woking. Can you please Correct this code for me.

Have you tried

stream_get_contents($stream); 

instead of your while ?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM