关于composer

1.composer安装tp5

1-1.下载composer-Setup.exe,安装,在wampPHP下面找到php.exe【E:\phpwamp\phpwamp\server\PHP-5.6.14\php.exe

1-2.cmd到wwwroot下面下载tp框架【composer create-project topthink/think  文件名  --prefer-dist

1-3.在网站【https://packagist.org/】搜索包 eg:topthink/think-captcha topthink/think-image  查看版本对应的依赖以及是否支持topthink/framework:~5.0..0

1-4.配置composer.json

{
    "name": "topthink/think",
    "description": "the new thinkphp framework",
    "type": "project",
    "keywords": [
        "framework",
        "thinkphp",
        "ORM"
    ],
    "homepage": "http://thinkphp.cn/",
    "license": "Apache-2.0",
    "authors": [
        {
            "name": "liu21st",
            "email": "liu21st@gmail.com"
        }
    ],
    "require": {
        "php": ">=5.4.0",
        "topthink/framework": "~5.0.0",
        "topthink/think-captcha":"1.0.7",
        "topthink/think-image":"1.0.7"

    },
    "autoload": {
        "psr-4": {
            "app\\": "application"
        }
    },
    "extra": {
        "think-path": "thinkphp"
    },
    "config": {
        "preferred-install": "dist"
    }
}

1-5.composer update下载依赖

posted @ 2017-12-22 15:40  爱编程的douyaer  阅读(234)  评论(0编辑  收藏  举报
Fork me on MaYun