来自AI助手的总结
xml_error_string() 函数用于获取 XML 解析器错误代码对应的文本描述,若无对应描述则返回 false。
PHP xml_error_string() 函数
定义和用法
xml_error_string() 函数获取 XML 解析器的错误描述。
语法
xml_error_string(errorcode)
参数 | 描述 |
---|---|
errorcode | 必需。规定要使用的错误代码。该错误码是 xml_get_error_code() 函数的返回值。 |
说明
返回与 errorcode 描述的错误代码参数对应的文本描述字符串,若没有与之对应的描述,则返回 false。
例子
" . "Line: " . xml_get_current_line_number($xmlparser) . "
" . "Column: " . xml_get_current_column_number($xmlparser) . "
"); } } xml_parser_free($xmlparser); ?>
输出:
ERROR: Mismatched tag Line: 8
© 版权声明
THE END
暂无评论内容