加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长学院 > PHP教程 > 正文

phpseclib给了我一个奇怪的错误

发布时间:2020-12-13 21:54:45 所属栏目:PHP教程 来源:网络整理
导读:我试图使用这个,但它只是给了我这个错误,我不知道如何解决这个问题.. Warning: include_once(Math/BigInteger.php): failed to open stream: No such file or directory in /home/www/sfs_web/statistics/_public/_functions/Server/Net/SSH2.php on line 89
我试图使用这个,但它只是给了我这个错误,我不知道如何解决这个问题..

Warning: include_once(Math/BigInteger.php): failed to open stream: No
such file or directory in
/home/www/sfs_web/statistics/_public/_functions/Server/Net/SSH2.php on
line 891

Warning: include_once(): Failed opening ‘Math/BigInteger.php’ for
inclusion (include_path=’.:/usr/share/php:/usr/share/pear’) in
/home/www/sfs_web/statistics/_public/_functions/Server/Net/SSH2.php on
line 891

Warning: include_once(Crypt/Random.php): failed to open stream: No
such file or directory in
/home/www/sfs_web/statistics/_public/_functions/Server/Net/SSH2.php on
line 895

Warning: include_once(): Failed opening ‘Crypt/Random.php’ for
inclusion (include_path=’.:/usr/share/php:/usr/share/pear’) in
/home/www/sfs_web/statistics/_public/_functions/Server/Net/SSH2.php on
line 895

Warning: include_once(Crypt/Hash.php): failed to open stream: No such
file or directory in
/home/www/sfs_web/statistics/_public/_functions/Server/Net/SSH2.php on
line 899

Warning: include_once(): Failed opening ‘Crypt/Hash.php’ for inclusion
(include_path=’.:/usr/share/php:/usr/share/pear’) in
/home/www/sfs_web/statistics/_public/_functions/Server/Net/SSH2.php on
line 899

Warning: include_once(Crypt/Base.php): failed to open stream: No such
file or directory in
/home/www/sfs_web/statistics/_public/_functions/Server/Net/SSH2.php on
line 904

Warning: include_once(): Failed opening ‘Crypt/Base.php’ for inclusion
(include_path=’.:/usr/share/php:/usr/share/pear’) in
/home/www/sfs_web/statistics/_public/_functions/Server/Net/SSH2.php on
line 904

Fatal error: Call to undefined function
phpseclib_resolve_include_path() in
/home/www/sfs_web/statistics/_public/_functions/Server/Net/SSH2.php on
line 1226

include('Net/SSH2.php');
$ssh = new Net_SSH2('host');
if (!$ssh->login('user','pass')) {
  echo('Login Failed');
}

$ssh->exec('the cmd line...");
$ssh->disconnect();

解决方法

phpseclib可能不在你的include_path中.引用 phpseclib.sourceforge.net,

<?php
set_include_path(get_include_path() . PATH_SEPARATOR . 'phpseclib');

include('Net/SSH2.php');
?>

您需要根据需要进行调整.如果phpseclib在vendor / phpseclib目录中,那么请改为’vendor / phpseclib’等.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读