How to load phpseclib in codeigniter

前端 未结 1 1303
既然无缘
既然无缘 2021-01-24 20:19

As per title, has anyone achieved this? What are the best practices on including this library into codeigniter (v2.1.2) ?

I know it can be done by simply using include/r

相关标签:
1条回答
  • the $this->load->library method is for libraries that already exist within codeigniter.

    You could create a wrapper for the PHPSecLib class, however what's probably easiest at the moment is to simply include it.

    1. Download the source code fromm phpseclib's page.
    2. Upload it to the /application/third_party folder
    3. include the file.

      include(APPPATH . '/third_party/phpseclib/Net/SSH2.php');

    4. Create an instance of class your wanting to use.

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