如果我做這樣的事情:持續FTP連接
rename('ftp://user:[email protected]/pub/file1.txt','ftp://user:[email protected]/pub/fileA.txt');
rename('ftp://user:[email protected]/pub/file2.txt','ftp://user:[email protected]/pub/fileB.txt');
rename('ftp://user:[email protected]/pub/file3.txt','ftp://user:[email protected]/pub/fileC.txt');
rm('ftp://user:[email protected]/pub/fileA.txt');
rm('ftp://user:[email protected]/pub/fileB.txt');
rm('ftp://user:[email protected]/pub/fileC.txt');
將PHP的保持同一服務器上的不同業務之間的FTP連接?換句話說,我不知道在這種情況下,PHP是否會創建單獨的連接或保持它活着?如果它創建單獨的連接,那麼當我使用文件包裝器傳輸文件時,如何強制它使用它。我知道我可以使用不同的方法,而不是ftp包裝,但我想知道這是如何與文件包裝。
可能沒有。嘗試使用[PHP的FTP擴展](http://php.net/manual/en/book.ftp.php) – Robik
問題是我不想改變整個代碼,尤其是當前的方法允許我輕鬆地在ftp或sftp之間切換(ssh2.sftp://)。改變這個類將需要很多工作。 –