コード例 #1
0
	    /**
	     * Execute command
	     *
	     * @param string $command
	     * @return bool
	     */
	    public function Execute($command)
	    {
	        if (!$this->SSHConnection->IsConnected())
                $this->Connect();
                
            $res = $this->SSHConnection->Exec($command);
            if ($res === true)
                $res = $this->SSHConnection->StdErr;
                
            return $res;
	    }
コード例 #2
0
		/**
		 * Is SSH2 connected
		 *
		 * @return bool
		 */
		public function IsConnected()
		{
		    return $this->SSH2->IsConnected();
		}