Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> CodeIgniter + SSH2
mariuszg
post 28.11.2016, 18:46:16
Post #1





Grupa: Zarejestrowani
Postów: 136
Pomógł: 0
Dołączył: 22.06.2006

Ostrzeżenie: (0%)
-----


Witam,

Do CodeIgniter-a chcę dodać bibliotekę SSH2.
http://phpseclib.sourceforge.net/ssh/intro.html

Przekopiowałem do libraries\ssh

Następnie podlinkowałem i rozszerzyłem klasę Net_SSH2

  1. if ( ! defined('BASEPATH')) exit('No direct script access allowed');
  2. require_once dirname(__FILE__) . '/ssh/Net/SSH2.php';
  3. class Ssh extends Net_SSH2
  4. {
  5. function __construct()
  6. {
  7. parent::__construct();
  8. }
  9. }



W kontrolerze :

  1. public function a()
  2. {
  3. $this->load->library('ssh');
  4. }



i posypało się błędami

"
A PHP Error was encountered

Severity: Warning

Message: Missing argument 1 for Net_SSH2::__construct(), called in D:\wamp\www\vncn\application\libraries\Ssh.php on line 9 and defined

Filename: Net/SSH2.php

Line Number: 886

Backtrace:

File: D:\wamp\www\vncn\application\libraries\ssh\Net\SSH2.php
Line: 886
Function: _error_handler

File: D:\wamp\www\vncn\application\libraries\Ssh.php
Line: 9
Function: __construct

File: D:\wamp\www\vncn\application\controllers\rack.php
Line: 185
Function: library

File: D:\wamp\www\vncn\index.php
Line: 292
Function: require_once
"

aha - przykład w instrukcji bez użycia CodeIgniter-a działa

Proszę o wsparcie
Go to the top of the page
+Quote Post
lukaskolista
post 28.11.2016, 19:22:55
Post #2





Grupa: Zarejestrowani
Postów: 872
Pomógł: 94
Dołączył: 31.03.2010

Ostrzeżenie: (0%)
-----


Przecież jest wyraźnie napisane, że nie podajesz argumentu do konstruktora.
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 14.08.2025 - 00:23