update ftp.php

Added setPassiveMode for changing FTP passive mode to on or off. In passive mode, data connections are initiated by the client, rather than by the server. It may be needed if the client is behind firewall.
Added exception to getConnection method when connection to FTP server fails.
Public methods should be defined before private methods. I suggest you move this to right after the constructor, as it's likely to be used before any of the other methods.