I need to test ftp_login for errors, the function I have connects fine but if the username, passwd, or servername is incorrect, ftp_login fails and spills errors all over my page. This is what it looks like:
function connect()
{
global $server, $username, $password;
$conn = ftp_connect($server);
ftp_login($conn, $username, $password);
return $conn;
}
$conn is returned so it wiil always be true so I can't test if that's true or false. I checked the manual and I'm still not sure what to test for.
Can anyone help me out?