简体   繁体   中英

Telegram API-vendor/autoload.php

I want to integrate a telegram API in PHP. I refereed following link https://github.com/funcoding/TelegramPHPBot/blob/master/README.md
I installed composer on my machine but i am not able to generate vendor/autoload.php file. I am new to this. can anyone give me solution.

After creating the composer.json file run composer install command to install the dependencies. This will create a vendor folder where you can find autoload.php file.

Just follow below steps for install Telegram API :

  1. Download master.zip file. Extract zip file into your local wamp server.
  2. Open your cmd and then go to your wamp directory using cd wamp and cd www .
  3. Then go to your Telegram API directory using cd Telegram API
  4. Then run composer install command from command prompt
  5. Now you can see vendor folder in your Telegram API directory after finish installation.

No need to edit composer.json file.

See below screenshot

在此处输入图片说明


Composer.json code

{
    "name": "curiouscoder/telegram-php-bot",
    "description": "Telegram Bot API written in PHP",
    "keywords": ["telegram-bot", "telegram", "bot", "api"],
    "type": "library",
    "require": {
      "php": ">=5.4",
      "guzzlehttp/guzzle": "5.3.0"
    },
    "require-dev": {
    },
    "autoload": {
        "psr-4": {
            "CuriousCoder\\TelegramBot\\": "src"
        }
    },
    "license": "MIT",
    "authors": [
        {
            "name": "Vinay Kumar",
            "email": "vinaykumar1989@gmail.com",
        "role": "Developer"
        }
    ],
    "minimum-stability": "dev"
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM