ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
``` 安装vendor ``` ``` D:\phpStudy\WWW\20210414>composer config -g repo.packagist composer https://mirr ors.aliyun.com/composer/ [RuntimeException] File "composer.json" cannot be found in the current directory config [-g|--global] [-e|--editor] [-a|--auth] [--unset] [-l|--list] [-f|--file FILE] [--absolute] [--] [<setting-key>] [<setting-value>]... D:\phpStudy\WWW\20210414>composer config -g repo.packagist composer https://pack agist.phpcomposer.com [RuntimeException] File "composer.json" cannot be found in the current directory config [-g|--global] [-e|--editor] [-a|--auth] [--unset] [-l|--list] [-f|--file FILE] [--absolute] [--] [<setting-key>] [<setting-value>]... D:\phpStudy\WWW\20210414>composer search topthink [Symfony\Component\Console\Exception\RuntimeException] Not enough arguments (missing: "tokens"). search [-N|--only-name] [-t|--type TYPE] [--] <tokens> (<tokens>)... D:\phpStudy\WWW\20210414>composer search -N topthink [Symfony\Component\Console\Exception\RuntimeException] Not enough arguments (missing: "tokens"). search [-N|--only-name] [-t|--type TYPE] [--] <tokens> (<tokens>)... D:\phpStudy\WWW\20210414>composer show Composer could not find a composer.json file in D:\phpStudy\WWW\20210414 To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section D:\phpStudy\WWW\20210414>composer config repo.packagist composer https://mirrors .aliyun.com/composer/ [RuntimeException] File "composer.json" cannot be found in the current directory config [-g|--global] [-e|--editor] [-a|--auth] [--unset] [-l|--list] [-f|--file FILE] [--absolute] [--] [<setting-key>] [<setting-value>]... D:\phpStudy\WWW\20210414>composer config -g repo.packagist composer https://mirr ors.aliyun.com/composer/ [RuntimeException] File "composer.json" cannot be found in the current directory config [-g|--global] [-e|--editor] [-a|--auth] [--unset] [-l|--list] [-f|--file FILE] [--absolute] [--] [<setting-key>] [<setting-value>]... D:\phpStudy\WWW\20210414>composer config -g repo.packagist composer https://mirr ors.aliyun.com/composer/ [RuntimeException] File "composer.json" cannot be found in the current directory config [-g|--global] [-e|--editor] [-a|--auth] [--unset] [-l|--list] [-f|--file FILE] [--absolute] [--] [<setting-key>] [<setting-value>]... D:\phpStudy\WWW\20210414>composer config repo.packagist composer https://mirrors .aliyun.com/composer/ [RuntimeException] File "composer.json" cannot be found in the current directory config [-g|--global] [-e|--editor] [-a|--auth] [--unset] [-l|--list] [-f|--file FILE] [--absolute] [--] [<setting-key>] [<setting-value>]... D:\phpStudy\WWW\20210414>composer -g config repo.packagist composer https://mirr ors.aliyun.com/composer/ ______ / ____/___ ____ ___ ____ ____ ________ _____ / / / __ \/ __ `__ \/ __ \/ __ \/ ___/ _ \/ ___/ / /___/ /_/ / / / / / / /_/ / /_/ (__ ) __/ / \____/\____/_/ /_/ /_/ .___/\____/____/\___/_/ /_/ Composer version 1.2.1 2016-09-12 11:27:19 Usage: command [options] [arguments] Options: -h, --help Display this help message -q, --quiet Do not output any message -V, --version Display this application version --ansi Force ANSI output --no-ansi Disable ANSI output -n, --no-interaction Do not ask any interactive question --profile Display timing and memory usage information --no-plugins Whether to disable plugins. -d, --working-dir=WORKING-DIR If specified, use the given directory as workin g directory. -v|vv|vvv, --verbose Increase the verbosity of messages: 1 for norma l output, 2 for more verbose output and 3 for debug Available commands: about Short information about Composer archive Create an archive of this composer package browse Opens the package's repository URL or homepage in your browser . clear-cache Clears composer's internal package cache. clearcache Clears composer's internal package cache. config Set config options create-project Create new project from a package into given directory. depends Shows which packages cause the given package to be installed diagnose Diagnoses the system to identify common errors. dump-autoload Dumps the autoloader dumpautoload Dumps the autoloader exec Execute a vendored binary/script global Allows running commands in the global composer dir ($COMPOSER_ HOME). help Displays help for a command home Opens the package's repository URL or homepage in your browser . info Show information about packages init Creates a basic composer.json file in current directory. install Installs the project dependencies from the composer.lock file if present, or falls back on the composer.json. licenses Show information about licenses of dependencies list Lists commands outdated Shows a list of installed packages that have updates available , including their latest version. prohibits Shows which packages prevent the given package from being inst alled remove Removes a package from the require or require-dev require Adds required packages to your composer.json and installs them run-script Run the scripts defined in composer.json. search Search for packages self-update Updates composer.phar to the latest version. selfupdate Updates composer.phar to the latest version. show Show information about packages status Show a list of locally modified packages suggests Show package suggestions update Updates your dependencies to the latest version according to c omposer.json, and updates the composer.lock file. validate Validates a composer.json and composer.lock why Shows which packages cause the given package to be installed why-not Shows which packages prevent the given package from being inst alled D:\phpStudy\WWW\20210414>composer install Composer could not find a composer.json file in D:\phpStudy\WWW\20210414 To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section D:\phpStudy\WWW\20210414>composer init Welcome to the Composer config generator This command will guide you through creating your composer.json config. Package name (<vendor>/<name>) [administrator/20210414]: Description []: Author [, n to skip]: Invalid author string. Must be in the format: John Smith <john@example.com> Author [, n to skip]: Invalid author string. Must be in the format: John Smith <john@example.com> Author [, n to skip]: Invalid author string. Must be in the format: John Smith <john@example.com> Author [, n to skip]: zhang Invalid author string. Must be in the format: John Smith <john@example.com> Author [, n to skip]: zhang bo Invalid author string. Must be in the format: John Smith <john@example.com> Author [, n to skip]: John Smith <john@example.com> Minimum Stability []: dev Package Type (e.g. library, project, metapackage, composer-plugin) []: library License []: Define your dependencies. Would you like to define your dependencies (require) interactively [yes]? y Search for a package: topthink/think=5.1.20 Warning from https://packagist.org: You are using an outdated version of Compose r. Composer 2 is now available and you should upgrade. See https://getcomposer.o rg/2 Search for a package: topthink Found 15 packages matching topthink [0] topthink/think [1] topthink/framework [2] topthink/think-orm [3] topthink/think-worker [4] topthink/think-template [5] topthink/think-swoole [6] topthink/think-queue [7] topthink/think-migration [8] topthink/think-helper [9] topthink/think-captcha [10] topthink/think-view [11] topthink/think-trace [12] topthink/think-testing [13] topthink/think-multi-app [14] topthink/think-mongo Enter package # to add, or the complete package name if it is not listed: 0 Enter the version constraint to require (or leave blank to use the latest versio n): 5.1.20 Search for a package: Would you like to define your dev dependencies (require-dev) interactively [yes] ? y Search for a package: { "name": "administrator/20210414", "type": "library", "require": { "topthink/think": "5.1.20" }, "authors": [ { "name": "John Smith", "email": "john@example.com" } ], "minimum-stability": "dev" } Do you confirm generation [yes]? y D:\phpStudy\WWW\20210414>composer config -g repo.packagist composer https://pack D:\phpStudy\WWW\20210414>composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/ D:\phpStudy\WWW\20210414>composer create-project topthink/think=5.1.20 tp5 Loading composer repositories with package information Warning from https://packagist.org: You are using an outdated version of Compose r. Composer 2 is now available and you should upgrade. See https://getcomposer.o rg/2 Updating dependencies (including require-dev) - Installing topthink/think-installer (2.0.x-dev 38ba647) Cloning 38ba647706e35d6704b5d370c06f8a160b635f88 Failed to download topthink/think-installer from source: Failed to clone htt ps://github.com/top-think/think-installer.git, git was not found, check that it is installed and in your PATH env. 'git' 不是内部或外部命令,也不是可运行的程序 或批处理文件。 Now trying to download from dist - Installing topthink/think-installer (2.0.x-dev 38ba647) Loading from cache - Installing topthink/framework (5.1.x-dev 7137741) Cloning 7137741a323a4a60cfca334507cd1812fac91bb2 Failed to download topthink/framework from source: Failed to clone https://g ithub.com/top-think/framework.git, git was not found, check that it is installed and in your PATH env. 'git' 不是内部或外部命令,也不是可运行的程序 或批处理文件。 Now trying to download from dist - Installing topthink/framework (5.1.x-dev 7137741) Loading from cache - Installing topthink/think (v5.1.20) Downloading: 100% Writing lock file Generating autoload files D:\phpStudy\WWW\20210414> ```