php - ftp_get - Warning: ftp_get(): Opening BINARY mode data connection

后端 未结 5 591
自闭症患者
自闭症患者 2021-01-13 07:04

I\'m trying to write a script that will download files from an FTP server. They\'re all fairly large (nearly 2GB each). The script starts running, but then eventually term

5条回答
  •  温柔的废话
    2021-01-13 07:56

    Try to increase FTP_TIMEOUT (the default value is 90)

    ftp_set_option($conn_id, FTP_TIMEOUT_SEC, 180);
    

    It worked perfectly for me.

    http://www.php.net/manual/en/function.ftp-set-option.php

提交回复
热议问题