How can I handle ftp_login errors to print what I want to screen instead of spitting "warning at line bla bla bla" all over my page if the username or password is incorrect?
// function to connect to FTP server
function connect()
{
global $server, $username, $password;
$conn = ftp_connect($server);
ftp_login($conn, $username, $password);
return $conn;
}
if username or passwd incorrect i get the default:
"Warning: ftp_login cannot login user 'bla bla bla' error line bla bla bla"