【问题标题】:I need innerHTML with the library PHP Simple DOM Parser我需要带有库 PHP Simple DOM Parser 的 innerHTML
【发布时间】:2016-02-18 19:20:21
【问题描述】:

我一直在研究 PHP Simple DOM Parser,我现在面临的问题是我无法通过库获得 innerHTML。需要帮助
图书馆链接:
http://simplehtmldom.sourceforge.net/
如果你使用过这个库,你可以帮我找到这个库支持/生成内部 HTML 吗?

【问题讨论】:

    标签: php html dom


    【解决方案1】:

    我找到了尝试其功能的解决方案。
    您可以使用 innertext() 或 outertext() 函数获取 html

    $html = str_get_html('<div id="hello">Hello</div><div id="world">World</div>');
    $html->innertext;
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-06-07
      • 1970-01-01
      • 1970-01-01
      • 2019-09-21
      • 2011-09-04
      • 1970-01-01
      相关资源
      最近更新 更多