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.

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

报告相同问题?

悬赏问题

  • ¥15 电力市场出清matlab yalmip kkt 双层优化问题
  • ¥20 matlab yalmip kkt 双层优化问题
  • ¥15 如何在3D高斯飞溅的渲染的场景中获得一个可控的旋转物体
  • ¥88 实在没有想法,需要个思路
  • ¥15 MATLAB报错输入参数太多
  • ¥15 python中合并修改日期相同的CSV文件并按照修改日期的名字命名文件
  • ¥15 有赏,i卡绘世画不出
  • ¥15 如何用stata画出文献中常见的安慰剂检验图
  • ¥15 c语言链表结构体数据插入
  • ¥40 使用MATLAB解答线性代数问题