博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
DOMDocument::loadHTML(): htmlParseEntityRef: expecting ';' in Entity,
阅读量:7199 次
发布时间:2019-06-29

本文共 516 字,大约阅读时间需要 1 分钟。

$html = file_get_contents("http://www.somesite.com/");$dom = new DOMDocument();$dom->loadHTML($html);echo $dom;

THROWS

Warning: DOMDocument::loadHTML(): htmlParseEntityRef: expecting ';' in Entity,Catchable fatal error: Object of class DOMDocument could not be converted to string in test.php on line 10

(1) calling htmlentities() or similar on the string will fix the problem.

(2)To evaporate the warning, you can use 

  libxml的链接:

From:

本文转自ZH奶酪博客园博客,原文链接:http://www.cnblogs.com/CheeseZH/p/4858274.html,如需转载请自行联系原作者

你可能感兴趣的文章
Takeown、Cacls、Icacls-文件、文件夹夺权用法
查看>>
centos7的新特性
查看>>
我的程序员之路(一)
查看>>
Spring事务管理(二) 声明式事务管理
查看>>
Spring思维导图,让Spring不再难懂(ioc篇)
查看>>
JVM调优之:内存分配参数
查看>>
webpack CSS LESS
查看>>
设计模式——模板方法模式
查看>>
eqweqe23
查看>>
面向对象
查看>>
javascript 添加事件兼容性处理
查看>>
Linux 目录卡死
查看>>
微服务框架Spring Cloud之使用事件和消息队列实现分布式事务
查看>>
碉堡了Ubuntu Core Linux支持 TS-4900 物联网开发板
查看>>
聊一聊啥都不会的我自学Linux系统的历程
查看>>
如何在多Kubernetes集群和多租户环境中使用Prometheus监控
查看>>
Thymeleaf教程 (十) 属性的优先级列表
查看>>
linux中 vi / vim显示行号或取消行号命令
查看>>
Python学习笔记 - 02: 用Python Client连接ElasticSearch操作数据
查看>>
2018年前端开发回顾
查看>>