Très bien, je me connecte à 3 ip différents lorsque je lance ce script.FTP_NLIST PHP est booléen (faux)
Copie les fichiers des répertoires et les télécharge sur le site Web.
Je vais avoir un léger problème avec deux d'entre eux les IP ...
Je me suis tourné le ftp passif, mais il semble toujours revenir comme bool (false)
Updating server 1
bool(false)
Warning: ftp_get() [function.ftp-get]: Filename cannot be empty in updater.php on line 42
Warning: ftp_get() [function.ftp-get]: Error opening in updater.php on line 42
Updated cache...
bool(false)
Warning: ftp_get() [function.ftp-get]: Filename cannot be empty in updater.php on line 60
Warning: ftp_get() [function.ftp-get]: Error opening in updater.php on line 60
BZh9rE8PUpdated maps...
Updating server 2
bool(false)
Warning: ftp_get() [function.ftp-get]: Filename cannot be empty in updater.php on line 103
Warning: ftp_get() [function.ftp-get]: Error opening in updater.php on line 103
Updated cache...
bool(false)
Warning: ftp_get() [function.ftp-get]: Filename cannot be empty in updater.php on line 121
Warning: ftp_get() [function.ftp-get]: Error opening in updater.php on line 121
BZh9rE8PUpdated maps...
Updating server 3
array(1) { [0]=> string(36) "1ba90fa2e972b50cdaa6bb23c403296b.dua" } Updated cache...
array(8) { [0]=> string(6) "graphs" [1]=> string(22) "sb_Forlorn_sb3_R2L.bsp" [2]=> string(17) "sb_gooniverse.bsp" [3]=> string(22) "sb_lostinspace_rc5.bsp" [4]=> string(19) "sb_new_worlds_2.bsp" [5]=> string(22) "sb_Spacewar_SB3_V1.bsp" [6]=> string(21) "sb_twinsuns_fixed.bsp" [7]=> string(10) "soundcache" } Updated maps...
. Une partie du script:
ftp_pasv($conn, true);
ftp_chdir($conn,"$DIR/maps/");
$files = ftp_nlist($conn,"*.*");
var_dump($files);
chdir('sandbox/cache/');
for($i=0;$i<count($files);$i++){
if(!ftp_is_dir($files[$i])){
usleep(500000);
if(!file_exists($files[$i])){
ftp_get($conn,$files[$i],$files[$i],FTP_ASCII);
}
}
}
echo "Updated cache...<br />";