简体   繁体   中英

ftp_connect() is not working in PHP

My ftp_connect() is not working what is done is as follow:

input:

    $file = 'COPYING.txt';
$fp = fopen($file, 'r');

// set up basic connection
$conn_id = ftp_ssl_connect("74.3.171.67");
var_dump($conn_id);

output:

bool(false)

If the output if false, it means the ftp connect has failed. This is either due to the server not accepting connections, the server not running or the PHP server being unable to connect to it.

I'd suggest trying to connect to the ftp server via an ftp client to verify the FTP server is up and running correctly. If it is, the problem is your server cannot reach it.

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