dsimib1625 2015-10-22 20:18
浏览 24

无法安装Clickatell Php Library

I'm trying to install the clickatell php library after this instruction:

https://github.com/arcturial/clickatell

But so far i was only able to install composer.

They say: this library uses composer and can be acquired using the following in your composer.json file.

{
    "require": {
        "arcturial/clickatell": "*"
    }
}

So I have to add this to the composer json file? Then require the json file in my php script? I've no idea what to do next. Any help would be great.

  • 写回答

1条回答 默认 最新

  • douzheng9221 2015-10-26 07:50
    关注

    When you are in your project root, run the following:

    create a composer.json file with the following contents:

    {
        "name": "your/project",
        "description": "project description",
        "require": {
            "arcturial/clickatell": "*"
        }
    }
    

    php -r "readfile('https://getcomposer.org/installer');" | php

    This will download a file called composer.phar

    php composer.phar install

    This will install the dependencies you specified in your composer.json file. Once complete, your project will now have a folder called "vendor".

    Include the "vendor/autoload.php" file in your script

    require_once __DIR__ . '/vendor/autoload.php';
    

    ...

    Now you should be able to use the library as specified in the documentation.

    评论

报告相同问题?

悬赏问题

  • ¥28 微信小程序开发页面布局没问题,真机调试的时候页面布局就乱了
  • ¥15 python的qt5界面
  • ¥15 无线电能传输系统MATLAB仿真问题
  • ¥50 如何用脚本实现输入法的热键设置
  • ¥20 我想使用一些网络协议或者部分协议也行,主要想实现类似于traceroute的一定步长内的路由拓扑功能
  • ¥30 深度学习,前后端连接
  • ¥15 孟德尔随机化结果不一致
  • ¥15 apm2.8飞控罗盘bad health,加速度计校准失败
  • ¥15 求解O-S方程的特征值问题给出边界层布拉休斯平行流的中性曲线
  • ¥15 谁有desed数据集呀