【发布时间】:2012-07-01 11:44:15
【问题描述】:
我需要将一个帐户转移到另一台服务器。最大的问题是:一个有Cpanel(好!),另一个有自定义品牌面板(坏=()。所以,我想:用PHP转移怎么样?(如何?不知道)
我知道服务器支持 exec,并且我有 Jailsshell (SSH),但是 wget 被禁用。不知道其他限制。想法?
我试过这个:
function ftp($host, $username, $password, $local, $remote) {
$execTime = 7000;
ini_set('max_execution_time', $execTime);
set_time_limit($execTime);
$c = ftp_connect($host);
ftp_set_option($c, FTP_TIMEOUT_SEC, $execTime);
ftp_login($c, $username, $password) or die("Can't login");
ftp_get($c, $local, $remote, FTP_ASCII);
ftp_close($c) or die("Can't close");
}
但是获取请求超时..
【问题讨论】:
-
您是否想过压缩所有内容,并使用 file_get_contents() 和 file_put_contents() 创建一个 php 文件?
-
@HamZaDzCyberDeV 不起作用。请参阅我更新的问题。
-
在你的代码顶部试试这个:ini_set('max_execution_time', 0);
标签: php file shell file-transfer