failed to open stream error message while trying to include phpseclib

前端 未结 2 763

I\'m trying to follow the instructions for installing phpseclib.

I unpackaged everything and created a new phpseclib folder into /usr/share/pear

相关标签:
2条回答
  • 2021-01-22 22:13

    Did not you forget to place a slash / after setting the path?

    So, should be like:

     <?php
              set_include_path(get_include_path() . PATH_SEPARATOR . 'phpseclib/');
              include('Net/SSH2.php');
          ?> 
    

    or

    <?php
                  set_include_path(get_include_path() . PATH_SEPARATOR . 'phpseclib' . PATH_SEPARATOR);
                  include('Net/SSH2.php');
              ?> 
    
    0 讨论(0)
  • 2021-01-22 22:16

    I changed the code to read:

    <?php 
    
    set_include_path(get_include_path() . get_include_path().'/phpseclib');
    include('Net/SSH2.php');
    echo('if you are reading this, phpseclib has been included');
    

    and that fixed the problem.

    0 讨论(0)
提交回复
热议问题