update ftp.php

Added setPassiveMode method for changing FTP passive mode to on or off. Because can't transfer files when FTP mode is incorrect.
Added try catch block to getConnection method for catching connection failure to FTP server.