返回使用compo......登陆

使用composer下载安装导入smarty

奋斗2019-01-11 15:25:52193

详细步骤:

(1)首先保证自己的电脑上安装了composer,打开composer的网址(https://www.phpcomposer.com/),点击安装包列表,搜索smarty,找到smarty的安装命令(composer require smarty/smarty)

(2)打开命令窗口,到项目的目录smarty下,黏贴命令composer require smarty/smarty回车即可下载。

(3)在代码中引用smarty,代码如下

require __DIR__.'/vendor/autoload.php';

$smarty = new Smarty();

最新手记推荐

• 用composer安装thinkphp框架的步骤• 省市区接口说明• 用thinkphp,后台新增栏目• 管理员添加编辑删除• 管理员添加编辑删除

全部回复(0)我要回复

暂无评论~
  • 取消回复发送
  • php.cn