Composer 是PHP中的一个依赖管理工具 类似 centos的yum工具
初始化
{ "name": "vendor/test", "description": null, "authors": [ { "name": "baixinxing", "email": "baixinxing@163.com" } ], "require": { } }
安装smarty做测试
1、搜索smarty
方法1:https://packagist.org/ 下搜索smarty
方法2:https://github.com/ 下搜索smarty
在我们的composer.json引用 smarty
安装
可能会出现如下错误(描述为空) null自己随便写点什么 记住是双引号 “”
安装完成
新建index.php<?php include ‘./vendor/autoload.php‘; $smarty = new Smarty(); var_dump($smarty);
剩下的就是根据自己项目 配置和使用smarty了
netbeans composer,布布扣,bubuko.com
原文:http://blog.csdn.net/starparker/article/details/20733397