doushou8730 2018-10-24 14:14
浏览 234
已采纳

Composer访问Stripe文件

I new in Composer. I have been searching and I have managed to install it:
curl -s https://getcomposer.org/installer | php
sudo mv composer.phar /usr/bin/composer

If I understand the second line makes it accessible globally in my computer.

I have checked that have installed correctly as I have written composer in the terminal and it gives me a list of commands and descriptions.

Now I want to install Stripe. I follow that instructions: https://stripe.com/docs/recipes/subscription-signup#creating-the-signup-form-using-checkout

I write in the terminal: composer require stripe/stripe-php I see they install a folder in the root of the computer (in a Mac, the house with my name) the folder: vendor/stripe

Now the Stripe instructions have a file with: require_once('vendor/autoload.php'); If I am in MAMP how should I reach to the Stripe files with the require? How should be the link?

  • 写回答

1条回答 默认 最新

  • douwo1517 2018-10-24 14:17
    关注

    In your project (inside MAMP) you should run composer install. There you will see the vendor file appear and will be easier for you to track the path.

    As you correctly mentioned you will require the autoload.php file which is in inside the vendor file which will appear.

    Just make sure that before run the composer install that you are inside your project folder.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?