首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

tidy::$errorBuffer

(PHP 5, PHP 7, PECL tidy >= 0.5.2)

tidy :: $ errorBuffer - tidy_get_error_buffer - 返回解析指定文档时发生的警告和错误

描述

面向对象的风格(属性):

string $tidy->errorBuffer;

程序风格:

代码语言:javascript
复制
string tidy_get_error_buffer ( tidy $tidy )

返回解析指定文档时发生的警告和错误。

参数

tidy

整洁的对象。

返回值

以字符串形式返回错误缓冲区。

例子

Example #1 tidy_get_error_buffer() example

代码语言:javascript
复制
<?php
$html?=?'<p>paragraph</p>';

$tidy?=?tidy_parse_string($html);

echo?tidy_get_error_buffer($tidy);
/*?or?in?OO:?*/
echo?$tidy->errorBuffer;
?>

上面的例子将输出:

代码语言:javascript
复制
line 1 column 1 - Warning: missing <!DOCTYPE> declaration
line 1 column 1 - Warning: inserting missing 'title' element

扫码关注腾讯云开发者

领取腾讯云代金券

http://www.vxiaotou.com