Home  >  Article  >  Backend Development  >  thinkphp中的composer.json是做啥用的

thinkphp中的composer.json是做啥用的

WBOY
WBOYOriginal
2016-06-23 13:12:191809browse

{    "name": "topthink/thinkphp",    "description": "the ThinkPHP Framework",    "type": "framework",    "keywords": ["framework","thinkphp","ORM"],    "homepage": "http://thinkphp.cn/",    "license": "Apache2",    "authors": [        {            "name": "liu21st",            "email": "liu21st@gmail.com"        }    ],    "require": {        "php": ">=5.3.0"    },    "minimum-stability": "dev"}

上面是此文件的代码


回复讨论(解决方案)

这个是在执行composer install或者composer require时候自动找的配置文件。不用管他。

这个是在执行composer install或者composer require时候自动找的配置文件。不用管他。


再追问一下 composer install或者composer require是做啥用的?

看来你不太熟悉composer。composer相当于npm或者Linux下的yum或者php pear他的目的就解决 程序依赖关系的。
举例来说:composer create-project yiisoft/yii2-app-basic这个就是下载yii2基础程序模板的。这个命令先到packagist.org上找到依赖关系(包括要下载插件和在github上位置等等)然后到github.com找到 这些程序进行下载。composer install 、composer create-project 、composer require、composer license --format=json等等这些都是composer一些命令而已

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn