jontynewman/html-filter 问题修复 & 功能扩展

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

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

jontynewman/html-filter

Composer 安装命令:

composer require jontynewman/html-filter

包简介

A stream filter for converting special HTML characters.

README 文档

README

A stream filter for converting special HTML characters.

Installation

composer require 'jontynewman/html-filter ^1.0'

Example

<?php

use JontyNewman\HtmlFilter;

require 'vendor/autoload.php';

HtmlFilter::passthru(__FILE__, 'rb');

The static "passthru" method provides a shorthand for the following code.

<?php

use JontyNewman\HtmlFilter;

require 'vendor/autoload.php';

$handle = HtmlFilter::open(__FILE__, 'rb');

if (false === fpassthru($handle)) {
    throw new RuntimeException('Failed to pass through stream');
}

if (false === fclose($handle)) {
    throw new RuntimeException('Failed to close stream');
}

In addition, the static "open" method provides a shorthand for the following code.

<?php

use JontyNewman\HtmlFilter;

require 'vendor/autoload.php';

HtmlFilter::register();

$handle = fopen(__FILE__, 'rb');

if (false === $handle) {
    throw new RuntimeException('Failed to open stream');
}

if (false === stream_filter_append($handle, HtmlFilter::NAME)) {
    throw new RuntimeException('Failed to append filter');
}

if (false === fpassthru($handle)) {
    throw new RuntimeException('Failed to pass through stream');
}

if (false === fclose($handle)) {
    throw new RuntimeException('Failed to close stream');
}

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-10-31

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固