php - How do I use FTP_Implicit_SSL class to connect to Implicit SSL/TSL? -
i need connect ftp server implicit ssl/tls
a quick google , found this chaps wrapper class
but there no demo on how use it? can't see how or specify user name, password etc...
i'm sure it's easy cannot see how set them. if run following code errors straight away:
<?php include "../objects/shared/ftp-implicit-ssl-tls.php"; $ftp_implicit_ssl = new ftp_implicit_ssl(); ?>
error:
warning: missing argument 1 ftp_implicit_ssl::__construct(), called in c:\wamp\www_dev\ftp.php on line 4 , defined in c:\wamp\www\objects\shared\ftp-implicit-ssl-tls.php on line 35
do set credentials in class itself? surely not!
i don't think read class carefully. when create new class need __construct() method, that's gets called when call new class()
/** * connect ftp server on implicit ssl/tls * * * @access public * @since 1.0 * @param string $username * @param string $password * @param string $server * @param int $port * @param string $initial_path * @param bool $passive_mode * @throws exception - blank username / password / port * @return \ftp_implicit_ssl */ public function __construct( $username, $password, $server, $port = 990, $initial_path = '', $passive_mode = false ) {
that first part in comments called docblock , tells need know instantiate class arguments. this
$ftp_implicit_ssl = new ftp_implicit_ssl($username, $password, 'your.server.com');
Comments
Post a Comment