"PHP Simple HTML DOM Parser"의 두 판 사이의 차이

5번째 줄: 5번째 줄:
* HTML DOM 처리기
* HTML DOM 처리기
* MIT 라이선스
* MIT 라이선스
==예시==
<syntaxhighlight lang='php' run>
<?php
include_once 'vendor/autoload.php';
use simplehtmldom\HtmlDocument;
$html = new HtmlDocument();
$html->load('<div id="hello">Hello</div><div id="world">World</div>');
$html->find('div', 1)->class = 'bar';
$html->find('div[id=hello]', 0)->innertext = 'foo';
echo $html;
</syntaxhighlight>


==참고==
==참고==

2021년 8월 16일 (월) 19:22 판

1 개념

PHP Simple HTML DOM Parser, SimpleHTMLDom, simplehtmldom
PHP 심플 HTML DOM 파서
  • "PHP용 빠르고, 간단하고, 신뢰할 수 있는 HTML 문서 파서"
  • HTML DOM 처리기
  • MIT 라이선스

2 예시

PHP
Copy
<?php
include_once 'vendor/autoload.php';
use simplehtmldom\HtmlDocument;

$html = new HtmlDocument();
$html->load('<div id="hello">Hello</div><div id="world">World</div>');
$html->find('div', 1)->class = 'bar';
$html->find('div[id=hello]', 0)->innertext = 'foo';
echo $html;
Loading

3 참고