lvincesl/html_template 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

lvincesl/html_template

最新稳定版本:2.0.2

Composer 安装命令:

composer require lvincesl/html_template

包简介

A simple template engine for PHP

README 文档

README

Packagist Version PHP Version License

A simple template engine for PHP.

Installation

composer require lvinceslas/htmltemplate

Using Docker (without Composer installed locally)

docker run --rm -it \
  -v "$(pwd):/app" \
  -w /app \
  composer require lvinceslas/htmltemplate

Usage

Create an HTML template file with placeholders, for example:

Hello <b>{%NAME%}</b>, you have successfully installed <em>lvinceslas/htmltemplate</em>!

Then use it in PHP:

<?php

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

use Lvinceslas\Html\HtmlTemplate;

$template = new HtmlTemplate(__DIR__ . '/path/to/template.html');
$template->set('NAME', 'John Doe');

// You can echo the object directly
echo $template;

// Or explicitly call show()
// $template->show();

Running the test suite

Unit tests use PHPUnit 9.6 (dev dependency). From a clone of this repository, install dependencies then run the suite:

composer install
./vendor/bin/phpunit

Configuration is read from phpunit.xml.dist at the project root.

Using Docker (without Composer installed locally)

docker run --rm -it \
  -v "$(pwd):/app" \
  -w /app \
  composer:latest \
  sh -c "composer install --no-interaction && ./vendor/bin/phpunit"

统计信息

  • 总下载量: 88
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: CECILL-C
  • 更新时间: 2015-07-29

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固