fyre/htmlhelper

v2.0.8 2024-06-29 01:49 UTC

This package is auto-updated.

Last update: 2024-09-29 02:19:52 UTC


README

FyreHTMLHelper 是一个免费的、开源的 PHP HTML助手库。

目录

安装

使用 Composer

composer require fyre/htmlhelper

在 PHP 中

use Fyre\Utility\HtmlHelper;

方法

属性

生成属性字符串。

  • $options 是包含属性的数组。
$attributes = HtmlHelper::attributes($options);

转义

在 HTML 中转义字符串。

  • $string 是要转义的字符串。
$escaped = HtmlHelper::escape($string);

获取字符集

获取字符集。

$charset = HtmlHelper::getCharset();

设置字符集

设置字符集。

  • $charset 是表示字符集的字符串。
HtmlHelper::setCharset($charset);