dongxichan8627
2017-03-04 19:38
浏览 229
已采纳

使用composer和PuTTY安装Paypal PHP SDK

Using PuTTY (I don't have root access to the server) I typed composer require "paypal/rest-api-sdk-php:*" as it said here: https://github.com/paypal/PayPal-PHP-SDK/wiki/Installation-Composer and it works fine, but how can I install it into directory d/pp/ instead of root? I tried d/pp/composer require "paypal/rest-api-sdk-php:*" but that's not it

I already downloaded the SDK directly but it seems not to work properly so I want to try it this way and I want to learn it anyway

图片转代码服务由CSDN问答提供 功能建议

使用PuTTY(我没有服务器的root访问权限)我输入 composer require“paypal / rest-api-sdk-php:*“,因为它在这里说: https://github.com/paypal/PayPal-PHP-SDK/wiki/Installation-Composer 它工作正常,但我怎样才能将它安装到目录 d / pp / 而不是root? 我试过 d / pp / composer需要“paypal / rest-api-sdk-php:*”但是不是吗

我已经直接下载了SDK但是 它似乎没有正常工作所以我想这样尝试,我想要学习它

  • 写回答
  • 好问题 提建议
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • dongshiru5913 2017-03-04 19:47
    已采纳

    Create a file named composer.json in your root directory and add the following code to it:

    {
      "config": {
        "vendor-dir": "d/pp"
      },
      "require": {
        "paypal/rest-api-sdk-php": "*"
      }
    }
    

    now run composer install.

    The config parameter lets you define configurations for your packages.

    The vendor-dir directive sets the package's destination.

    If you want to add more packages - in your require:{} section just add those too and run composer update.

    已采纳该答案
    评论
    解决 无用
    打赏 举报

相关推荐 更多相似问题