nggit / php-xmlentities
将所有Unicode字符和字符引用转换为数字字符引用
dev-master
2019-03-05 04:48 UTC
Requires
- php: >=5.3.0
This package is auto-updated.
Last update: 2024-09-05 19:14:48 UTC
README
PHP xmlentities
提示: 将此 md
文件重命名为 php
以在您的Web服务器上测试。
<?php
require 'src/NCR.php';
$str = '<p> © © with ❤ </p>';
$encoded = Nggit\PHPXMLEntities\NCR::encode($str);
这些都是可移植的ASCII字符
echo $encoded;
// Source view:
// <p> © © with ❤ </p>
exit;
?>
就这样!这个库不使用 mbstring
或 iconv
扩展以提高更好的兼容性。