function disconnect() { // if disconnect function is available call it.. if (function_exists('ssh2_disconnect')) { ssh2_disconnect($this->conn); } else { // if no disconnect func is available, close conn, unset var @fclose($this->conn); unset($this->conn); } // return null always return NULL; }
public function disconnect() { $this->logAction("Disconnecting from {$this->host}"); // if disconnect function is available call it.. if (function_exists('ssh2_disconnect')) { ssh2_disconnect($this->conn); } else { // if no disconnect func is available, close conn, unset var @fclose($this->conn); $this->conn = false; } // return null always return NULL; }
/** * disconnect from SSH2 server */ public function disconnect() { if (function_exists('ssh2_disconnect')) { ssh2_disconnect($this->connection); } else { @fclose($this->connection); unset($this->connection); } }