When i try to connect to FTP server using
ftp_ssl_connect()
, it is giving me this error
ftp_login() expects parameter 1 to be resource, boolean given in /home/web/public_html/FTP.php on line 9
Here is my source code
<?php
// set up basic ssl connection
$conn_id = ftp_ssl_connect($host,'990','20');
// login with username and password
$ftp_user_name='user';
$ftp_user_pass='pass';
$login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);
if (!$login_result) {
// PHP will already have raised an E_WARNING level message in this case
die("can't login");
}
echo ftp_pwd($conn_id); // /
// close the ssl connection
ftp_close($conn_id);
?>
I saw many question like this, but not given me any appropriate answers, please help.