<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                [TOC] [參考網址](http://simplehtmldom.sourceforge.net/ ) [github 源碼 ](https://github.com/samacs/simple_html_dom) ``` <?php /* 寫在前言 其本質就是把file_get_content獲取到的dom 字符串進行解析,解析后,期屬性綁定在對應的標簽上 可以直接使用dom->屬性進行輸出. */ //引入文檔 require_once 'Vender/simple_html_dom/simple_html_dom.php'; // 新建一個Dom實例 $html->load_file('http://www.cnphp.info/php-simple-html-dom-parser-intro.html');? ?? // 從字符串中加載? ?? $html->load('從字符串中加載html文檔演示');? ?? //從文件中加載? ?? $html->load_file('path/file/test.html'); //可使用類似jquery方式查找元素 // 查找id='#container'的元素 $ret = $html->find('#container'); // 找到所有class=foo的元素? ?? $ret = $html->find('.foo');? ?? // 查找多個html標簽? ?? $ret = $html->find('a, img');? ?? // 還可以這樣用? ?? $es = $html->find('table td[align=center]'); //遍歷 // Find all article blocks foreach($html->find('div.article') as $article) { $item['title'] = $article->find('div.title', 0)->plaintext; //plaintext 去掉html 標簽 $item['intro'] = $article->find('div.intro', 0)->plaintext; $item['details'] = $article->find('div.details', 0)->plaintext; $articles[] = $item; } // 返回父元素 $e->parent; // 返回子元素數組? ?? $e->children;? ?? // 通過索引號返回指定子元素? ?? $e->children(0);? ?? // 返回第一個資源速? ?? $e->first_child ();? ?? //復制后獲取新值 $a->href = 'http://www.cnphp.info'; $doc = $html; // 輸出 echo $doc; //釋放內存 $html->clear(); ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看