shish/microhtml
最新稳定版本:v2.5.0
Composer 安装命令:
composer require shish/microhtml
包简介
A minimal HTML generating library
关键字:
README 文档
README
Moving from Hack to vanilla PHP, I miss XHP T__T
This isn't XHP, but it does provide a minimum-bullshit method of generating HTML in a consistent and secure manner
<?php use function MicroHTML\{HTML,SECTION,H1,P,DIV}; $page = HTML( SECTION(["id"=>"news"], H1("My title"), P("Here's some content") ) ); $page->appendChild( SECTION(["id"=>"comments"], DIV("Oh noes: <script>alert('a haxxor is attacking us');</script>") ) ); print($page);
<html> <section id='news'> <h1>My title</h1> <p>Here's some content</p> </section> <section id='comments'> <div>Oh noes: <script>alert('a haxxor is attacking us');</script></div> </section> </html>
Testing
composer install
composer check
Release
git tag v1.2.3
git push --tags
统计信息
- 总下载量: 35.71k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 1
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-09-21