我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

PHP简单的HTML DOM解析器返回空白

I'm trying to get HTML DOM to work with a website but no matter how much I alter it, it doesn't work. Everything's just blank. Here's the code:

<?php

include_once('simple_html_dom.php');
$target_url = "http://beyonce.com";
$html = new simple_html_dom();
$html->load_file($target_url);
foreach($html->find('div[class=header-wrapper]') as $post)
{
echo $post."<br />";
}
?>

Site: http://beyonce.com!

近期文章

  • 文件上传 - MySQL服务器已经消失
  • 模态隐藏在FF但不是Chrome,IE11
  • 下载后使用Cakephp中的响应删除文件
  • Symfony3 FSOUserbundle和FR3LdapBundle配置
  • ValueError:需要超过0个值来解压缩Python中的错误
  • PHP ZipArchive getFromName无法读取具有相对路径的文件
  • 在图像拼贴中添加蒙版
  • PHP curl获取http代码301
  • 在PHP中执行嵌套的<script>标记
  • 无法加载cakephp模型
  • 在azure web app上托管symfony2应用程序
  • Laravel Excel - 获取活动单元格或行
  • PHP图像生成器缓存
  • 创建一个简单的数据库PHP搜索引擎
  • 如何使插件工作?
  • PHP stdClass中的可捕获致命错误
  • 检查用户是否已登录并使页面无法访问
  • PHP无法检查输入并跳转到下一页[重复]
  • 如果给出了错误的URL,则处理SimpleXMLElement错误
  • 尝试将.zip文件从VB .NET上传到服务器时出错

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华