simplehtmldom 500错误
我看到 simplehtmldom 上有很多主题,但似乎没有人的问题是我的 - 具体来说,它只有 500 秒,即使在提供的示例中也是如此。我发现我可以包含该文件而不会出现错误,但如果我随后尝试使用 file_get_html,则需要 500 秒。我在安装手册中发现的唯一一件事是allow_fopen_url可能存在问题,我确实这样做了。
我缺少什么吗?
I saw that there are a lot of topics on simplehtmldom, but no one's problem seems to be mine- specifically, that it just 500s, even on the examples provided. I've found that I can include the file without an error, but if I then try to use file_get_html, it 500s. The only thing I found in the manual about installation is a possible problem with allow_fopen_url, which I do.
Something I'm missing?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
自从你问这个问题以来似乎已经太久了,但自从我自己尝试解决这个问题时遇到了这个问题,我想我应该发布对我有用的内容。
我通过将
file_get_html
更改为file_get_contents
解决了这个问题。由于我想使用simple_html_dom
中的“查找”功能,因此我必须将字符串转换为对象:Seems like too long since you asked this question, but since I came across this trying to solve this problem myself, I thought I'd post what worked for me.
I solved this problem by changing
file_get_html
tofile_get_contents
. Since I wanted to use the 'find' feature insimple_html_dom
, I had to then convert the string to an object: