私のlocalhostでHTML DOM解析を学習しようとしています。しかし、私はうまくいきなりクラッシュします。単純なHTML DOM解析が動作しません
1)私は、新しいプロジェクト )私は私が私のHTMLプロジェクト
<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<?php
// put your code here
$html = file_get_html('http://www.google.com/');
?>
</body>
</html>
4)私が手の内側にこのコードを入れている)simplehtmldom.sourceforge.net
3からファイルをダウンロードしたをしました
致命的なエラー:未知のエラー:C:\ xampp \ htdocs \ PhpProject1 \ index.phpの未定義関数file_get_html()を呼び出します:15 Stac kトレース:#0 {main}はC:\ xampp \ htdocs \ PhpProject1 \ index.phpに15行目で投げた
私はここで何かを誤解していますか?
DOMパーサーを使用する必要があります。詳細はこちら[https://sourceforge.net/projects/simplehtmldom/files/] –
@AshiqurRahmanこれらのファイルをダウンロードしてプロジェクトフォルダに保存しました – ragulin
HTMLパーツにDOMパーサーPHPライブラリファイルを含める必要があります。 –