ftp_ssl_connection via php
Why when I'm trying to do:
$conn_id=ftp_ssl_connect($ftp_server);
$login_result=ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);
echo ftp_pwd($conn_id);
ftp_close($conn_id);
I get the following errors:
Warning: ftp_login() expects parameter 1 to be resource, boolean given in /home/...
Warning: ftp_pwd() expects parameter 1 to be resource, boolean given in /home/....
Warnin开发者_如何学运维g: ftp_close() expects parameter 1 to be resource, boolean given /home/...
That means that ftp_ssl_connect
returned false instead of a connection resource. So likely either your $ftp_server url is incorrect, the server is refusing your connection, or there's some other connection error happening.
Because ftp_ssl_connect returns FALSE.
Returns a SSL-FTP stream on success or FALSE on error.
精彩评论